-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[UIAM] Cloud API key authentication metadata and validations #129227
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
Changes from 39 commits
d5bc9d2
c673649
3f6b6ff
604c630
95c9a38
d45fe0c
cd8b9f1
3be47f0
12908fa
0b6bdff
c974761
113f6a5
5b89907
7bfb559
6966cea
e3abd81
8b0f1d3
ca6efe8
444b9a1
f868daf
e4f5b9e
0686c92
65aebd2
f1965d3
30dc57d
bd19d18
4d07cdc
e32af54
d17cc23
999ac5c
ae897ae
4cf1ad7
ddb73d4
9d87460
e796769
9aa18de
9495904
bc55bfb
8ff2b6d
740b073
1455346
3e4099c
532e8ff
52348f6
667710d
ea11ed1
217b48c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,8 @@ public final class AuthenticationField { | |
| public static final String API_KEY_CREATOR_REALM_TYPE = "_security_api_key_creator_realm_type"; | ||
| public static final String API_KEY_ID_KEY = "_security_api_key_id"; | ||
| public static final String API_KEY_NAME_KEY = "_security_api_key_name"; | ||
| public static final String API_KEY_MANAGED_BY_KEY = "_security_api_key_managed_by"; | ||
|
||
| public static final String API_KEY_INTERNAL_KEY = "_security_api_key_internal"; | ||
| public static final String API_KEY_TYPE_KEY = "_security_api_key_type"; | ||
| public static final String API_KEY_METADATA_KEY = "_security_api_key_metadata"; | ||
| public static final String API_KEY_ROLE_DESCRIPTORS_KEY = "_security_api_key_role_descriptors"; | ||
|
|
||
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.
I'd prefer a separate method
checkConsistencyForCloudApiKeyAuthenticatingSubjectfor cloud API keys here -- cloud API keys are fundamentally different from stack API keys. For example, we don't expect role descriptors in cloud API key metadata. We currently don't check for the presence of role descriptors for stack API keys either but could easily do that in the future. Similarly I think it's a good consistency check that cloud API keys don't have role descriptors in metadata.I'd also add a check to
checkConsistencyForApiKeyAuthenticatingSubjectthatinternalis not set since that doesn't make sense for stack API keys.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.
++ Agreed.
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.
I've pushed the changes which add dedicated consistency check for cloud API keys and additionally made run-as unsupported for cloud API keys. Currently, there is no need to support them. We can always enable it in the future.