Skip to content
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

API Refactor: Downstream and Admin authorizers #1595

Merged
merged 3 commits into from
May 29, 2020

Conversation

azdagron
Copy link
Member

These authorizers authorize the caller as a downstream or admin workload by looking up the registration entries matching the caller ID.

They attach the respective downstream or admin entries to the context.

These authorizers use a helper to obtain the entries for the caller that uses the context to cache retrieved entries. This prevents the entry lookup from happening more than once if these authorizers are used for the same RPC (e.g., via AuthorizeAnyOf).

These authorizers authorize the caller as a downstream or admin workload
by looking up the registration entries matching the caller ID.

They attach the respective downstream or admin entries to the context.

These authorizers use a helper to obtain the entries for the
caller that uses the context to cache retrieved entries. This prevents
the entry lookup from happening more than once if these authorizers are
used for the same RPC (e.g., via AuthorizeAnyOf).

Signed-off-by: Andrew Harding <andrew.harding@hpe.com>
@azdagron azdagron changed the title Downstream and Admin authorizers API Refactor: Downstream and Admin authorizers May 29, 2020
Copy link
Member

@amartinezfayo amartinezfayo left a comment

Choose a reason for hiding this comment

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

Looks great!
One very small nit.


type callerEntriesKey struct{}

// WithCallerEntries returns a the caller entries retrieved using the given
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// WithCallerEntries returns a the caller entries retrieved using the given
// WithCallerEntries returns the caller entries retrieved using the given

Signed-off-by: Andrew Harding <andrew.harding@hpe.com>
@azdagron azdagron merged commit 1dfcc37 into spiffe:master May 29, 2020
@azdagron azdagron deleted the admin-and-downstream-authorizers branch May 29, 2020 20:17
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.

None yet

2 participants