Skip to content

Conversation

mullermp
Copy link
Contributor

@mullermp mullermp commented Sep 29, 2025

Resolves auth using an auth module instead of entirely in the resolve auth plugin. This is necessary so that presigners and other auth related utilities can resolve auth. The auth is now once again an auth scheme and has an attached signer and identity provider, so that signing can be done.

Also implements auth scheme preference config.

Copy link
Contributor

@jterapin jterapin left a comment

Choose a reason for hiding this comment

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

LGTM but there appears to be some RBS failure - FYI.

Comment on lines +6 to +11
class ApiKeySigner
def initialize(options = {})
@name = options[:name]
@in = options[:in]
@scheme = options[:scheme]
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these intended to be public interfaces - if so, we should include more documentation about init options? Here, other signers and auth scheme.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I intended them to be API private for now. I'm also not sure yet so I'm going to wait on documentation.

Copy link
Contributor

@richardwang1124 richardwang1124 left a comment

Choose a reason for hiding this comment

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

Looks good overall to me. There's a few failing RBS tests.

end

def resolve_without_endpoint_auth(config, auth_parameters)
auth_options = config.auth_resolver.resolve(auth_parameters)
Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm understanding this correctly, endpoint auth completely overrides the modeled auths?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. I think we should do it that way. It's less complex and I think endpoint auth is guaranteed to work.


properties[key] = value
end
normalized_endpoint_schemes << { scheme_id: normalized_scheme_id, signer_properties: properties }
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm assuming we'll need to make changes to sigv4 auth in V4 as well following these changes. Have you tested with V4?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I tested with v4 and I opened a separate PR.

@mullermp mullermp merged commit ce9aeaa into decaf Sep 30, 2025
20 checks passed
@mullermp mullermp deleted the endpoints-auth branch September 30, 2025 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants