@@ -21,69 +21,64 @@ const (
|
||||
ScopeV1IAM coredata.OAuth2Scope = "v1:iam"
|
||||
)
|
||||
|
||||
// IAMOAuth2ScopeSet returns OAuth2 scope mappings for IAM actions.
|
||||
func IAMOAuth2ScopeSet() *ScopeSet {
|
||||
return CreateScopeSet(
|
||||
map[coredata.OAuth2Scope][]Action{
|
||||
ScopeV1IAMRead: {
|
||||
ActionOrganizationGet,
|
||||
ActionOrganizationList,
|
||||
ActionIdentityGet,
|
||||
ActionSessionList,
|
||||
ActionSessionGet,
|
||||
ActionInvitationList,
|
||||
ActionInvitationGet,
|
||||
ActionMembershipGet,
|
||||
ActionMembershipList,
|
||||
ActionMembershipProfileGet,
|
||||
ActionMembershipProfileList,
|
||||
ActionPersonalAPIKeyGet,
|
||||
ActionPersonalAPIKeyList,
|
||||
ActionSAMLConfigurationGet,
|
||||
ActionSAMLConfigurationList,
|
||||
ActionSCIMConfigurationGet,
|
||||
ActionSCIMEventList,
|
||||
ActionSCIMEventGet,
|
||||
ActionSCIMBridgeGet,
|
||||
ActionOAuth2ConsentGet,
|
||||
ActionAuditLogEntryGet,
|
||||
ActionAuditLogEntryList,
|
||||
ActionOAuth2AccessTokenGet,
|
||||
ActionOAuth2AccessTokenList,
|
||||
},
|
||||
ScopeV1IAM: {
|
||||
ActionOrganizationCreate,
|
||||
ActionOrganizationUpdate,
|
||||
ActionOrganizationDelete,
|
||||
ActionIdentityUpdate,
|
||||
ActionIdentityDelete,
|
||||
ActionSessionRevoke,
|
||||
ActionSessionRevokeAll,
|
||||
ActionInvitationCreate,
|
||||
ActionInvitationAccept,
|
||||
ActionInvitationDelete,
|
||||
ActionMembershipUpdate,
|
||||
ActionMembershipDelete,
|
||||
ActionMembershipRoleSetOwner,
|
||||
ActionMembershipProfileCreate,
|
||||
ActionMembershipProfileUpdate,
|
||||
ActionMembershipProfileDelete,
|
||||
ActionMembershipProfileActivate,
|
||||
ActionMembershipProfileDeactivate,
|
||||
ActionPersonalAPIKeyCreate,
|
||||
ActionPersonalAPIKeyUpdate,
|
||||
ActionPersonalAPIKeyDelete,
|
||||
ActionSAMLConfigurationCreate,
|
||||
ActionSAMLConfigurationUpdate,
|
||||
ActionSAMLConfigurationDelete,
|
||||
ActionSCIMConfigurationCreate,
|
||||
ActionSCIMConfigurationUpdate,
|
||||
ActionSCIMConfigurationDelete,
|
||||
ActionSCIMBridgeCreate,
|
||||
ActionSCIMBridgeUpdate,
|
||||
ActionSCIMBridgeDelete,
|
||||
ActionOAuth2ConsentApprove,
|
||||
},
|
||||
},
|
||||
)
|
||||
var IAMOAuth2ScopeMappings = map[coredata.OAuth2Scope][]string{
|
||||
ScopeV1IAMRead: {
|
||||
ActionOrganizationGet,
|
||||
ActionOrganizationList,
|
||||
ActionIdentityGet,
|
||||
ActionSessionList,
|
||||
ActionSessionGet,
|
||||
ActionInvitationList,
|
||||
ActionInvitationGet,
|
||||
ActionMembershipGet,
|
||||
ActionMembershipList,
|
||||
ActionMembershipProfileGet,
|
||||
ActionMembershipProfileList,
|
||||
ActionPersonalAPIKeyGet,
|
||||
ActionPersonalAPIKeyList,
|
||||
ActionSAMLConfigurationGet,
|
||||
ActionSAMLConfigurationList,
|
||||
ActionSCIMConfigurationGet,
|
||||
ActionSCIMEventList,
|
||||
ActionSCIMEventGet,
|
||||
ActionSCIMBridgeGet,
|
||||
ActionOAuth2ConsentGet,
|
||||
ActionAuditLogEntryGet,
|
||||
ActionAuditLogEntryList,
|
||||
ActionOAuth2AccessTokenGet,
|
||||
ActionOAuth2AccessTokenList,
|
||||
},
|
||||
ScopeV1IAM: {
|
||||
ActionOrganizationCreate,
|
||||
ActionOrganizationUpdate,
|
||||
ActionOrganizationDelete,
|
||||
ActionIdentityUpdate,
|
||||
ActionIdentityDelete,
|
||||
ActionSessionRevoke,
|
||||
ActionSessionRevokeAll,
|
||||
ActionInvitationCreate,
|
||||
ActionInvitationAccept,
|
||||
ActionInvitationDelete,
|
||||
ActionMembershipUpdate,
|
||||
ActionMembershipDelete,
|
||||
ActionMembershipRoleSetOwner,
|
||||
ActionMembershipProfileCreate,
|
||||
ActionMembershipProfileUpdate,
|
||||
ActionMembershipProfileDelete,
|
||||
ActionMembershipProfileActivate,
|
||||
ActionMembershipProfileDeactivate,
|
||||
ActionPersonalAPIKeyCreate,
|
||||
ActionPersonalAPIKeyUpdate,
|
||||
ActionPersonalAPIKeyDelete,
|
||||
ActionSAMLConfigurationCreate,
|
||||
ActionSAMLConfigurationUpdate,
|
||||
ActionSAMLConfigurationDelete,
|
||||
ActionSCIMConfigurationCreate,
|
||||
ActionSCIMConfigurationUpdate,
|
||||
ActionSCIMConfigurationDelete,
|
||||
ActionSCIMBridgeCreate,
|
||||
ActionSCIMBridgeUpdate,
|
||||
ActionSCIMBridgeDelete,
|
||||
ActionOAuth2ConsentApprove,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user