-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding provider interface for fetching public keys of a service #2553
Conversation
@@ -64,6 +64,9 @@ type Provider interface { | |||
// GetSuffix returns the suffix for the current provider | |||
GetSuffix() string | |||
|
|||
// GetSuffixes returns a list of suffixes for the current provider | |||
GetSuffixes() []string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why keep the GetSuffix() api? since this is an internal interface for now and only used within the server, we can just update all the provider implementations to use GetSuffixes() instead of maintaining a deprecated api
@@ -0,0 +1,19 @@ | |||
package com.yahoo.athenz.common.server.key; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need the copyright header block
@@ -0,0 +1,28 @@ | |||
package com.yahoo.athenz.common.server.key; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need the copyright header block
} | ||
|
||
for (ServiceIdentity serviceIdentity: domainData.getServices()) { | ||
if (serviceIdentity.getName().equalsIgnoreCase(domain + "." + service)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should move the "domain + "." + service" outside of the for block so we're not executing for every call in the iteration since the value does not change
1b93b23
to
f583b25
Compare
Signed-off-by: Sasi Palaka <palakas@yahooinc.com>
Description
Adding a provider interface for fetching public keys of a service
Extending Go provider interface with GetSuffixes method
Contribution Checklist:
Attach Screenshots (Optional)