Skip to content

Conversation

adutra
Copy link
Contributor

@adutra adutra commented Sep 24, 2025

Fixes #14100.

@adutra
Copy link
Contributor Author

adutra commented Sep 24, 2025

FYI @nastra

sessionCache = newSessionCache(name, properties);
}

String oauth2ServerUri = properties.get(OAuth2Properties.OAUTH2_SERVER_URI);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My rationale here is: two auth sessions for 2 different catalogs, but with the same credential, would be wrongly conflated since they would share the same cache key.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't that a separate issue from the signer one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's connected imo: in the original issue reported by @c-thiel, if both catalogs use the same credential we would still get a 401 from the second one without this change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this something we could reproduce in a small test?

sessionCache = newSessionCache(name, properties);
}

String oauth2ServerUri = properties.get(OAuth2Properties.OAUTH2_SERVER_URI);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be falling back to ResourcePaths.tokens() because this property is not mandatory

void standaloneTableSessionEmptyProperties() {
Map<String, String> properties = Map.of();
Map<String, String> properties =
Map.of(OAuth2Properties.OAUTH2_SERVER_URI, "https://auth-server.com/v1/token");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this can be reverted, since the test says "empty properties" and we should be falling back to the tokens endpoint if the property isn't specified

Map<String, String> tableProperties =
Map.of(
OAuth2Properties.OAUTH2_SERVER_URI,
"https://auth-server.com/v1/token",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should change this here and further below

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Credential Leak when using Remote Signing with multiple Catalogs
3 participants