Documentation ¶
Index ¶
- Variables
- func GetActions() []security.Action
- func MakeAddClientRolesToUserEndpoint(component Component) cs.Endpoint
- func MakeAddGroupToUserEndpoint(component Component) cs.Endpoint
- func MakeAddRoleToUserEndpoint(component Component) cs.Endpoint
- func MakeAuthorizationManagementComponentMW(logger log.Logger, authorizationManager security.AuthorizationManager) func(Component) Component
- func MakeClearUserLoginFailures(component Component) cs.Endpoint
- func MakeCreateActivationCodeEndpoint(component Component) cs.Endpoint
- func MakeCreateClientRoleEndpoint(component Component, logger keycloakb.Logger) cs.Endpoint
- func MakeCreateGroupEndpoint(component Component, logger keycloakb.Logger) cs.Endpoint
- func MakeCreateRecoveryCodeEndpoint(component Component) cs.Endpoint
- func MakeCreateUserEndpoint(component Component, logger keycloakb.Logger) cs.Endpoint
- func MakeDeleteCredentialsForUserEndpoint(component Component) cs.Endpoint
- func MakeDeleteGroupEndpoint(component Component) cs.Endpoint
- func MakeDeleteGroupForUserEndpoint(component Component) cs.Endpoint
- func MakeDeleteRoleForUserEndpoint(component Component) cs.Endpoint
- func MakeDeleteUserEndpoint(component Component) cs.Endpoint
- func MakeExecuteActionsEmailEndpoint(component Component) cs.Endpoint
- func MakeGetActionsEndpoint(component Component) cs.Endpoint
- func MakeGetAttackDetectionStatus(component Component) cs.Endpoint
- func MakeGetAuthorizationsEndpoint(component Component) cs.Endpoint
- func MakeGetAvailableTrustIDGroupsEndpoint(component Component) cs.Endpoint
- func MakeGetClientEndpoint(component Component) cs.Endpoint
- func MakeGetClientRolesEndpoint(component Component) cs.Endpoint
- func MakeGetClientRolesForUserEndpoint(component Component) cs.Endpoint
- func MakeGetClientsEndpoint(component Component) cs.Endpoint
- func MakeGetCredentialsForUserEndpoint(component Component) cs.Endpoint
- func MakeGetGroupsEndpoint(component Component) cs.Endpoint
- func MakeGetGroupsOfUserEndpoint(component Component) cs.Endpoint
- func MakeGetRealmAdminConfigurationEndpoint(component Component) cs.Endpoint
- func MakeGetRealmBackOfficeConfigurationEndpoint(component Component) cs.Endpoint
- func MakeGetRealmCustomConfigurationEndpoint(component Component) cs.Endpoint
- func MakeGetRealmEndpoint(component Component) cs.Endpoint
- func MakeGetRealmsEndpoint(component Component) cs.Endpoint
- func MakeGetRequiredActionsEndpoint(component Component) cs.Endpoint
- func MakeGetRoleEndpoint(component Component) cs.Endpoint
- func MakeGetRolesEndpoint(component Component) cs.Endpoint
- func MakeGetRolesOfUserEndpoint(component Component) cs.Endpoint
- func MakeGetTrustIDGroupsOfUserEndpoint(component Component) cs.Endpoint
- func MakeGetUserAccountStatusByEmailEndpoint(component Component) cs.Endpoint
- func MakeGetUserAccountStatusEndpoint(component Component) cs.Endpoint
- func MakeGetUserChecksEndpoint(component Component) cs.Endpoint
- func MakeGetUserEndpoint(component Component) cs.Endpoint
- func MakeGetUserRealmBackOfficeConfigurationEndpoint(component Component) cs.Endpoint
- func MakeGetUsersEndpoint(component Component) cs.Endpoint
- func MakeLinkShadowUserEndpoint(component Component) cs.Endpoint
- func MakeLockUserEndpoint(component Component) cs.Endpoint
- func MakeManagementHandler(e endpoint.Endpoint, logger log.Logger) *http_transport.Server
- func MakeResetCredentialFailuresForUserEndpoint(component Component) cs.Endpoint
- func MakeResetPasswordEndpoint(component Component) cs.Endpoint
- func MakeResetSmsCounterEndpoint(component Component) cs.Endpoint
- func MakeSendOnboardingEmailEndpoint(component Component, maxLifeSpan int) cs.Endpoint
- func MakeSendReminderEmailEndpoint(component Component) cs.Endpoint
- func MakeSendSmsCodeEndpoint(component Component) cs.Endpoint
- func MakeSetTrustIDGroupsToUserEndpoint(component Component) cs.Endpoint
- func MakeUnlockUserEndpoint(component Component) cs.Endpoint
- func MakeUpdateAuthorizationsEndpoint(component Component) cs.Endpoint
- func MakeUpdateRealmAdminConfigurationEndpoint(component Component) cs.Endpoint
- func MakeUpdateRealmBackOfficeConfigurationEndpoint(component Component) cs.Endpoint
- func MakeUpdateRealmCustomConfigurationEndpoint(component Component) cs.Endpoint
- func MakeUpdateUserEndpoint(component Component) cs.Endpoint
- func Validate(authorizations []configuration.Authorization, ...) error
- type Component
- type ConvertLocationError
- type Endpoints
- type GlnVerifier
- type KeycloakClient
- type LocationHeader
- type OnboardingModule
- type UsersDetailsDBModule
Constants ¶
This section is empty.
Variables ¶
var ( MGMTGetActions = newAction("MGMT_GetActions", security.ScopeGlobal) MGMTGetRealms = newAction("MGMT_GetRealms", security.ScopeGlobal) MGMTGetRealm = newAction("MGMT_GetRealm", security.ScopeRealm) MGMTGetClient = newAction("MGMT_GetClient", security.ScopeRealm) MGMTGetClients = newAction("MGMT_GetClients", security.ScopeRealm) MGMTGetRequiredActions = newAction("MGMT_GetRequiredActions", security.ScopeRealm) MGMTDeleteUser = newAction("MGMT_DeleteUser", security.ScopeGroup) MGMTGetUser = newAction("MGMT_GetUser", security.ScopeGroup) MGMTUpdateUser = newAction("MGMT_UpdateUser", security.ScopeGroup) MGMTLockUser = newAction("MGMT_LockUser", security.ScopeGroup) MGMTUnlockUser = newAction("MGMT_UnlockUser", security.ScopeGroup) MGMTGetUsers = newAction("MGMT_GetUsers", security.ScopeGroup) MGMTCreateUser = newAction("MGMT_CreateUser", security.ScopeGroup) MGMTGetUserChecks = newAction("MGMT_GetUserChecks", security.ScopeGroup) MGMTGetUserAccountStatus = newAction("MGMT_GetUserAccountStatus", security.ScopeGroup) MGMTGetUserAccountStatusByEmail = newAction("MGMT_GetUserAccountStatusByEmail", security.ScopeRealm) MGMTGetRolesOfUser = newAction("MGMT_GetRolesOfUser", security.ScopeGroup) MGMTAddRoleToUser = newAction("MGMT_AddRoleToUser", security.ScopeGroup) MGMTDeleteRoleForUser = newAction("MGMT_DeleteRoleForUser", security.ScopeGroup) MGMTGetGroupsOfUser = newAction("MGMT_GetGroupsOfUser", security.ScopeGroup) MGMTSetGroupsToUser = newAction("MGMT_SetGroupsToUser", security.ScopeGroup) MGMTAssignableGroupsToUser = newAction("MGMT_AssignableGroupsToUser", security.ScopeGroup) MGMTGetAvailableTrustIDGroups = newAction("MGMT_GetAvailableTrustIDGroups", security.ScopeRealm) MGMTGetTrustIDGroups = newAction("MGMT_GetTrustIDGroups", security.ScopeGroup) MGMTSetTrustIDGroups = newAction("MGMT_SetTrustIDGroups", security.ScopeGroup) MGMTGetClientRolesForUser = newAction("MGMT_GetClientRolesForUser", security.ScopeGroup) MGMTAddClientRolesToUser = newAction("MGMT_AddClientRolesToUser", security.ScopeGroup) MGMTResetPassword = newAction("MGMT_ResetPassword", security.ScopeGroup) MGMTExecuteActionsEmail = newAction("MGMT_ExecuteActionsEmail", security.ScopeGroup) MGMTSendSmsCode = newAction("MGMT_SendSmsCode", security.ScopeGroup) MGMTSendOnboardingEmail = newAction("MGMT_SendOnboardingEmail", security.ScopeGroup) MGMTSendReminderEmail = newAction("MGMT_SendReminderEmail", security.ScopeGroup) MGMTResetSmsCounter = newAction("MGMT_ResetSmsCounter", security.ScopeGroup) MGMTCreateRecoveryCode = newAction("MGMT_CreateRecoveryCode", security.ScopeGroup) MGMTCreateActivationCode = newAction("MGMT_CreateActivationCode", security.ScopeGroup) MGMTGetCredentialsForUser = newAction("MGMT_GetCredentialsForUser", security.ScopeGroup) MGMTDeleteCredentialsForUser = newAction("MGMT_DeleteCredentialsForUser", security.ScopeGroup) MGMTResetCredentialFailuresForUser = newAction("MGMT_ResetCredentialFailuresForUser", security.ScopeGroup) MGMTClearUserLoginFailures = newAction("MGMT_ClearUserLoginFailures", security.ScopeGroup) MGMTGetAttackDetectionStatus = newAction("MGMT_GetAttackDetectionStatus", security.ScopeGroup) MGMTGetRoles = newAction("MGMT_GetRoles", security.ScopeRealm) MGMTGetRole = newAction("MGMT_GetRole", security.ScopeRealm) MGMTGetGroups = newAction("MGMT_GetGroups", security.ScopeRealm) MGMTCreateGroup = newAction("MGMT_CreateGroup", security.ScopeRealm) MGMTDeleteGroup = newAction("MGMT_DeleteGroup", security.ScopeGroup) MGMTGetAuthorizations = newAction("MGMT_GetAuthorizations", security.ScopeGroup) MGMTUpdateAuthorizations = newAction("MGMT_UpdateAuthorizations", security.ScopeGroup) MGMTGetClientRoles = newAction("MGMT_GetClientRoles", security.ScopeRealm) MGMTCreateClientRole = newAction("MGMT_CreateClientRole", security.ScopeRealm) MGMTGetRealmCustomConfiguration = newAction("MGMT_GetRealmCustomConfiguration", security.ScopeRealm) MGMTUpdateRealmCustomConfiguration = newAction("MGMT_UpdateRealmCustomConfiguration", security.ScopeRealm) MGMTGetRealmAdminConfiguration = newAction("MGMT_GetRealmAdminConfiguration", security.ScopeRealm) MGMTUpdateRealmAdminConfiguration = newAction("MGMT_UpdateRealmAdminConfiguration", security.ScopeRealm) MGMTGetRealmBackOfficeConfiguration = newAction("MGMT_GetRealmBackOfficeConfiguration", security.ScopeGroup) MGMTUpdateRealmBackOfficeConfiguration = newAction("MGMT_UpdateRealmBackOfficeConfiguration", security.ScopeGroup) MGMTGetUserRealmBackOfficeConfiguration = newAction("MGMT_GetUserRealmBackOfficeConfiguration", security.ScopeRealm) MGMTLinkShadowUser = newAction("MGMT_LinkShadowUser", security.ScopeRealm) )
Creates constants for API method names
Functions ¶
func MakeAddClientRolesToUserEndpoint ¶
MakeAddClientRolesToUserEndpoint creates an endpoint for AddClientRolesToUser
func MakeAddGroupToUserEndpoint ¶
MakeAddGroupToUserEndpoint creates an endpoint for AddGroupToUser
func MakeAddRoleToUserEndpoint ¶
MakeAddRoleToUserEndpoint creates an endpoint for AddRoleToUser
func MakeAuthorizationManagementComponentMW ¶
func MakeAuthorizationManagementComponentMW(logger log.Logger, authorizationManager security.AuthorizationManager) func(Component) Component
MakeAuthorizationManagementComponentMW checks authorization and return an error if the action is not allowed.
func MakeClearUserLoginFailures ¶
MakeClearUserLoginFailures creates an endpoint for ClearUserLoginFailures
func MakeCreateActivationCodeEndpoint ¶
MakeCreateActivationCodeEndpoint creates an endpoint for MakeCreateActivationCode
func MakeCreateClientRoleEndpoint ¶
MakeCreateClientRoleEndpoint creates an endpoint for CreateClientRole
func MakeCreateGroupEndpoint ¶
MakeCreateGroupEndpoint makes the endpoint to create a group.
func MakeCreateRecoveryCodeEndpoint ¶
MakeCreateRecoveryCodeEndpoint creates an endpoint for MakeCreateRecoveryCode
func MakeCreateUserEndpoint ¶
MakeCreateUserEndpoint makes the endpoint to create a user.
func MakeDeleteCredentialsForUserEndpoint ¶
MakeDeleteCredentialsForUserEndpoint creates an endpoint for DeleteCredentialsForUser
func MakeDeleteGroupEndpoint ¶
MakeDeleteGroupEndpoint creates an endpoint for DeleteGroup
func MakeDeleteGroupForUserEndpoint ¶
MakeDeleteGroupForUserEndpoint creates an endpoint for DeleteGroupForUser
func MakeDeleteRoleForUserEndpoint ¶
MakeDeleteRoleForUserEndpoint creates an endpoint for AddRoleToUser
func MakeDeleteUserEndpoint ¶
MakeDeleteUserEndpoint creates an endpoint for DeleteUser
func MakeExecuteActionsEmailEndpoint ¶
MakeExecuteActionsEmailEndpoint creates an endpoint for ExecuteActionsEmail
func MakeGetActionsEndpoint ¶
MakeGetActionsEndpoint creates an endpoint for GetActions
func MakeGetAttackDetectionStatus ¶
MakeGetAttackDetectionStatus creates an endpoint for GetAttackDetectionStatus
func MakeGetAuthorizationsEndpoint ¶
MakeGetAuthorizationsEndpoint creates an endpoint for GetAuthorizations
func MakeGetAvailableTrustIDGroupsEndpoint ¶
MakeGetAvailableTrustIDGroupsEndpoint creates an endpoint for GetAvailableTrustIDGroups
func MakeGetClientEndpoint ¶
MakeGetClientEndpoint creates an endpoint for GetClient
func MakeGetClientRolesEndpoint ¶
MakeGetClientRolesEndpoint creates an endpoint for GetClientRoles
func MakeGetClientRolesForUserEndpoint ¶
MakeGetClientRolesForUserEndpoint creates an endpoint for GetClientRolesForUser
func MakeGetClientsEndpoint ¶
MakeGetClientsEndpoint creates an endpoint for GetClients
func MakeGetCredentialsForUserEndpoint ¶
MakeGetCredentialsForUserEndpoint creates an endpoint for GetCredentialsForUser
func MakeGetGroupsEndpoint ¶
MakeGetGroupsEndpoint creates an endpoint for GetGroups
func MakeGetGroupsOfUserEndpoint ¶
MakeGetGroupsOfUserEndpoint creates an endpoint for GetGroupsOfUser
func MakeGetRealmAdminConfigurationEndpoint ¶
MakeGetRealmAdminConfigurationEndpoint creates an endpoint for GetRealmAdminConfiguration
func MakeGetRealmBackOfficeConfigurationEndpoint ¶
MakeGetRealmBackOfficeConfigurationEndpoint creates an endpoint for GetRealmBackOfficeConfiguration
func MakeGetRealmCustomConfigurationEndpoint ¶
MakeGetRealmCustomConfigurationEndpoint creates an endpoint for GetRealmCustomConfiguration
func MakeGetRealmEndpoint ¶
MakeGetRealmEndpoint makes the Realm endpoint to retrieve a realm.
func MakeGetRealmsEndpoint ¶
MakeGetRealmsEndpoint makes the Realms endpoint to retrieve all available realms.
func MakeGetRequiredActionsEndpoint ¶
MakeGetRequiredActionsEndpoint creates an endpoint for GetRequiredActions
func MakeGetRoleEndpoint ¶
MakeGetRoleEndpoint creates an endpoint for GetRole
func MakeGetRolesEndpoint ¶
MakeGetRolesEndpoint creates an endpoint for GetRoles
func MakeGetRolesOfUserEndpoint ¶
MakeGetRolesOfUserEndpoint creates an endpoint for GetRolesOfUser
func MakeGetTrustIDGroupsOfUserEndpoint ¶
MakeGetTrustIDGroupsOfUserEndpoint creates an endpoint for GetTrustIDGroupsOfUser
func MakeGetUserAccountStatusByEmailEndpoint ¶
MakeGetUserAccountStatusByEmailEndpoint creates an endpoint for GetUserAccountStatusByEmail
func MakeGetUserAccountStatusEndpoint ¶
MakeGetUserAccountStatusEndpoint creates an endpoint for GetUserAccountStatus
func MakeGetUserChecksEndpoint ¶
MakeGetUserChecksEndpoint creates an endpoint for GetUserChecks
func MakeGetUserEndpoint ¶
MakeGetUserEndpoint creates an endpoint for GetUser
func MakeGetUserRealmBackOfficeConfigurationEndpoint ¶
MakeGetUserRealmBackOfficeConfigurationEndpoint creates an endpoint for GetUserRealmBackOfficeConfiguration
func MakeGetUsersEndpoint ¶
MakeGetUsersEndpoint creates an endpoint for GetUsers
func MakeLinkShadowUserEndpoint ¶
MakeLinkShadowUserEndpoint makes the endpoint to create a shadow user.
func MakeLockUserEndpoint ¶
MakeLockUserEndpoint creates an endpoint for LockUser
func MakeManagementHandler ¶
MakeManagementHandler make an HTTP handler for a Management endpoint.
func MakeResetCredentialFailuresForUserEndpoint ¶
MakeResetCredentialFailuresForUserEndpoint creates an endpoint for UnlockCredentialForUser
func MakeResetPasswordEndpoint ¶
MakeResetPasswordEndpoint creates an endpoint for ResetPassword
func MakeResetSmsCounterEndpoint ¶
MakeResetSmsCounterEndpoint creates an endpoint for ResetSmsCounter
func MakeSendOnboardingEmailEndpoint ¶
MakeSendOnboardingEmailEndpoint creates an endpoint for SendOnboardingEmail
func MakeSendReminderEmailEndpoint ¶
MakeSendReminderEmailEndpoint creates an endpoint for SendReminderEmail
func MakeSendSmsCodeEndpoint ¶
MakeSendSmsCodeEndpoint creates an endpoint for SendSmsCode
func MakeSetTrustIDGroupsToUserEndpoint ¶
MakeSetTrustIDGroupsToUserEndpoint creates an endpoint for SetTrustIDGroupsToUser
func MakeUnlockUserEndpoint ¶
MakeUnlockUserEndpoint creates an endpoint for LockUser
func MakeUpdateAuthorizationsEndpoint ¶
MakeUpdateAuthorizationsEndpoint creates an endpoint for UpdateAuthorizations
func MakeUpdateRealmAdminConfigurationEndpoint ¶
MakeUpdateRealmAdminConfigurationEndpoint creates an endpoint for UpdateRealmAdminConfiguration
func MakeUpdateRealmBackOfficeConfigurationEndpoint ¶
MakeUpdateRealmBackOfficeConfigurationEndpoint creates an endpoint for UpdateRealmBackOfficeConfiguration
func MakeUpdateRealmCustomConfigurationEndpoint ¶
MakeUpdateRealmCustomConfigurationEndpoint creates an endpoint for UpdateRealmCustomConfiguration
func MakeUpdateUserEndpoint ¶
MakeUpdateUserEndpoint creates an endpoint for UpdateUser
func Validate ¶
func Validate(authorizations []configuration.Authorization, allowedTargetRealmsAndGroupNames map[string]map[string]struct{}) error
Validate the content of the provided array. Returns an error if any issue is detected
Types ¶
type Component ¶
type Component interface { GetActions(ctx context.Context) ([]api.ActionRepresentation, error) GetRealms(ctx context.Context) ([]api.RealmRepresentation, error) GetRealm(ctx context.Context, realmName string) (api.RealmRepresentation, error) GetClient(ctx context.Context, realmName, idClient string) (api.ClientRepresentation, error) GetClients(ctx context.Context, realmName string) ([]api.ClientRepresentation, error) GetRequiredActions(ctx context.Context, realmName string) ([]api.RequiredActionRepresentation, error) DeleteUser(ctx context.Context, realmName, userID string) error GetUser(ctx context.Context, realmName, userID string) (api.UserRepresentation, error) UpdateUser(ctx context.Context, realmName, userID string, user api.UpdatableUserRepresentation) error LockUser(ctx context.Context, realmName, userID string) error UnlockUser(ctx context.Context, realmName, userID string) error GetUsers(ctx context.Context, realmName string, groupIDs []string, paramKV ...string) (api.UsersPageRepresentation, error) CreateUser(ctx context.Context, realmName string, user api.UserRepresentation, generateUsername bool, generateNameID bool) (string, error) GetUserChecks(ctx context.Context, realmName, userID string) ([]api.UserCheck, error) GetUserAccountStatus(ctx context.Context, realmName, userID string) (map[string]bool, error) GetUserAccountStatusByEmail(ctx context.Context, realmName, email string) (api.UserStatus, error) GetRolesOfUser(ctx context.Context, realmName, userID string) ([]api.RoleRepresentation, error) AddRoleToUser(ctx context.Context, realmName, userID string, roleID string) error DeleteRoleForUser(ctx context.Context, realmName, userID string, roleID string) error GetGroupsOfUser(ctx context.Context, realmName, userID string) ([]api.GroupRepresentation, error) AddGroupToUser(ctx context.Context, realmName, userID string, groupID string) error DeleteGroupForUser(ctx context.Context, realmName, userID string, groupID string) error GetAvailableTrustIDGroups(ctx context.Context, realmName string) ([]string, error) GetTrustIDGroupsOfUser(ctx context.Context, realmName, userID string) ([]string, error) SetTrustIDGroupsToUser(ctx context.Context, realmName, userID string, groupNames []string) error GetClientRolesForUser(ctx context.Context, realmName, userID, clientID string) ([]api.RoleRepresentation, error) AddClientRolesToUser(ctx context.Context, realmName, userID, clientID string, roles []api.RoleRepresentation) error ResetPassword(ctx context.Context, realmName string, userID string, password api.PasswordRepresentation) (string, error) ExecuteActionsEmail(ctx context.Context, realmName string, userID string, actions []api.RequiredAction, paramKV ...string) error SendSmsCode(ctx context.Context, realmName string, userID string) (string, error) SendOnboardingEmail(ctx context.Context, realmName string, userID string, customerRealm string, reminder bool, lifespan *int) error SendReminderEmail(ctx context.Context, realmName string, userID string, paramKV ...string) error ResetSmsCounter(ctx context.Context, realmName string, userID string) error CreateRecoveryCode(ctx context.Context, realmName string, userID string) (string, error) CreateActivationCode(ctx context.Context, realmName string, userID string) (string, error) GetCredentialsForUser(ctx context.Context, realmName string, userID string) ([]api.CredentialRepresentation, error) DeleteCredentialsForUser(ctx context.Context, realmName string, userID string, credentialID string) error ResetCredentialFailuresForUser(ctx context.Context, realmName string, userID string, credentialID string) error ClearUserLoginFailures(ctx context.Context, realmName, userID string) error GetAttackDetectionStatus(ctx context.Context, realmName, userID string) (api.AttackDetectionStatusRepresentation, error) GetRoles(ctx context.Context, realmName string) ([]api.RoleRepresentation, error) GetRole(ctx context.Context, realmName string, roleID string) (api.RoleRepresentation, error) GetClientRoles(ctx context.Context, realmName, idClient string) ([]api.RoleRepresentation, error) CreateClientRole(ctx context.Context, realmName, clientID string, role api.RoleRepresentation) (string, error) GetGroups(ctx context.Context, realmName string) ([]api.GroupRepresentation, error) CreateGroup(ctx context.Context, realmName string, group api.GroupRepresentation) (string, error) DeleteGroup(ctx context.Context, realmName string, groupID string) error GetAuthorizations(ctx context.Context, realmName string, groupID string) (api.AuthorizationsRepresentation, error) UpdateAuthorizations(ctx context.Context, realmName string, groupID string, group api.AuthorizationsRepresentation) error GetRealmCustomConfiguration(ctx context.Context, realmName string) (api.RealmCustomConfiguration, error) UpdateRealmCustomConfiguration(ctx context.Context, realmID string, customConfig api.RealmCustomConfiguration) error GetRealmAdminConfiguration(ctx context.Context, realmName string) (api.RealmAdminConfiguration, error) UpdateRealmAdminConfiguration(ctx context.Context, realmID string, adminConfig api.RealmAdminConfiguration) error GetRealmBackOfficeConfiguration(ctx context.Context, realmID string, groupName string) (api.BackOfficeConfiguration, error) UpdateRealmBackOfficeConfiguration(ctx context.Context, realmID string, groupName string, config api.BackOfficeConfiguration) error GetUserRealmBackOfficeConfiguration(ctx context.Context, realmID string) (api.BackOfficeConfiguration, error) LinkShadowUser(ctx context.Context, realmName string, userID string, provider string, fedID api.FederatedIdentityRepresentation) error }
Component is the management component interface.
func NewComponent ¶
func NewComponent(keycloakClient KeycloakClient, usersDBModule UsersDetailsDBModule, eventDBModule database.EventsDBModule, configDBModule keycloakb.ConfigurationDBModule, onboardingModule OnboardingModule, authorizedTrustIDGroups []string, socialRealmName string, glnVerifier GlnVerifier, logger keycloakb.Logger) Component
NewComponent returns the management component.
type ConvertLocationError ¶
type ConvertLocationError struct {
Location string
}
ConvertLocationError type
func (ConvertLocationError) Error ¶
func (e ConvertLocationError) Error() string
type Endpoints ¶
type Endpoints struct { GetRealms endpoint.Endpoint GetRealm endpoint.Endpoint GetClient endpoint.Endpoint GetClients endpoint.Endpoint GetRequiredActions endpoint.Endpoint DeleteUser endpoint.Endpoint GetUser endpoint.Endpoint UpdateUser endpoint.Endpoint LockUser endpoint.Endpoint UnlockUser endpoint.Endpoint GetUsers endpoint.Endpoint CreateUser endpoint.Endpoint GetRolesOfUser endpoint.Endpoint AddRoleToUser endpoint.Endpoint DeleteRoleForUser endpoint.Endpoint GetGroupsOfUser endpoint.Endpoint AddGroupToUser endpoint.Endpoint DeleteGroupForUser endpoint.Endpoint GetAvailableTrustIDGroups endpoint.Endpoint GetTrustIDGroupsOfUser endpoint.Endpoint SetTrustIDGroupsToUser endpoint.Endpoint GetUserChecks endpoint.Endpoint GetUserAccountStatus endpoint.Endpoint GetUserAccountStatusByEmail endpoint.Endpoint GetClientRoleForUser endpoint.Endpoint AddClientRoleToUser endpoint.Endpoint ResetPassword endpoint.Endpoint ExecuteActionsEmail endpoint.Endpoint SendSmsCode endpoint.Endpoint SendOnboardingEmail endpoint.Endpoint SendReminderEmail endpoint.Endpoint ResetSmsCounter endpoint.Endpoint CreateRecoveryCode endpoint.Endpoint CreateActivationCode endpoint.Endpoint GetCredentialsForUser endpoint.Endpoint DeleteCredentialsForUser endpoint.Endpoint ResetCredentialFailuresForUser endpoint.Endpoint ClearUserLoginFailures endpoint.Endpoint GetAttackDetectionStatus endpoint.Endpoint GetRoles endpoint.Endpoint GetRole endpoint.Endpoint GetClientRoles endpoint.Endpoint CreateClientRole endpoint.Endpoint GetGroups endpoint.Endpoint CreateGroup endpoint.Endpoint DeleteGroup endpoint.Endpoint GetAuthorizations endpoint.Endpoint UpdateAuthorizations endpoint.Endpoint GetActions endpoint.Endpoint GetRealmCustomConfiguration endpoint.Endpoint UpdateRealmCustomConfiguration endpoint.Endpoint GetRealmAdminConfiguration endpoint.Endpoint UpdateRealmAdminConfiguration endpoint.Endpoint GetRealmBackOfficeConfiguration endpoint.Endpoint UpdateRealmBackOfficeConfiguration endpoint.Endpoint GetUserRealmBackOfficeConfiguration endpoint.Endpoint LinkShadowUser endpoint.Endpoint }
Endpoints wraps a service behind a set of endpoints.
type GlnVerifier ¶
GlnVerifier interface allows to check validity of a GLN
type KeycloakClient ¶
type KeycloakClient interface { GetRealms(accessToken string) ([]kc.RealmRepresentation, error) GetRealm(accessToken string, realmName string) (kc.RealmRepresentation, error) GetRequiredActions(accessToken string, realmName string) ([]kc.RequiredActionProviderRepresentation, error) GetClient(accessToken string, realmName, idClient string) (kc.ClientRepresentation, error) GetClients(accessToken string, realmName string, paramKV ...string) ([]kc.ClientRepresentation, error) DeleteUser(accessToken string, realmName, userID string) error GetUser(accessToken string, realmName, userID string) (kc.UserRepresentation, error) GetGroupsOfUser(accessToken string, realmName, userID string) ([]kc.GroupRepresentation, error) AddGroupToUser(accessToken string, realmName, userID, groupID string) error DeleteGroupFromUser(accessToken string, realmName, userID, groupID string) error UpdateUser(accessToken string, realmName, userID string, user kc.UserRepresentation) error GetUsers(accessToken string, reqRealmName, targetRealmName string, paramKV ...string) (kc.UsersPageRepresentation, error) CreateUser(accessToken string, realmName string, targetRealmName string, user kc.UserRepresentation) (string, error) GetClientRoleMappings(accessToken string, realmName, userID, clientID string) ([]kc.RoleRepresentation, error) AddClientRolesToUserRoleMapping(accessToken string, realmName, userID, clientID string, roles []kc.RoleRepresentation) error GetRealmLevelRoleMappings(accessToken string, realmName, userID string) ([]kc.RoleRepresentation, error) AddRealmLevelRoleMappings(accessToken string, realmName, userID string, roles []kc.RoleRepresentation) error DeleteRealmLevelRoleMappings(accessToken string, realmName, userID string, roles []kc.RoleRepresentation) error ResetPassword(accessToken string, realmName string, userID string, cred kc.CredentialRepresentation) error ExecuteActionsEmail(accessToken string, reqRealmName string, targetRealmName string, userID string, actions []string, paramKV ...string) error SendSmsCode(accessToken string, realmName string, userID string) (kc.SmsCodeRepresentation, error) CreateRecoveryCode(accessToken string, realmName string, userID string) (kc.RecoveryCodeRepresentation, error) CreateActivationCode(accessToken string, realmName string, userID string) (kc.ActivationCodeRepresentation, error) SendReminderEmail(accessToken string, realmName string, userID string, paramKV ...string) error GetRoles(accessToken string, realmName string) ([]kc.RoleRepresentation, error) GetRole(accessToken string, realmName string, roleID string) (kc.RoleRepresentation, error) GetGroups(accessToken string, realmName string) ([]kc.GroupRepresentation, error) GetClientRoles(accessToken string, realmName, idClient string) ([]kc.RoleRepresentation, error) CreateClientRole(accessToken string, realmName, clientID string, role kc.RoleRepresentation) (string, error) GetGroup(accessToken string, realmName, groupID string) (kc.GroupRepresentation, error) CreateGroup(accessToken string, realmName string, group kc.GroupRepresentation) (string, error) DeleteGroup(accessToken string, realmName string, groupID string) error AssignClientRole(accessToken string, realmName string, groupID string, clientID string, role []kc.RoleRepresentation) error RemoveClientRole(accessToken string, realmName string, groupID string, clientID string, role []kc.RoleRepresentation) error GetGroupClientRoles(accessToken string, realmName string, groupID string, clientID string) ([]kc.RoleRepresentation, error) GetAvailableGroupClientRoles(accessToken string, realmName string, groupID string, clientID string) ([]kc.RoleRepresentation, error) GetCredentials(accessToken string, realmName string, userID string) ([]kc.CredentialRepresentation, error) UpdateLabelCredential(accessToken string, realmName string, userID string, credentialID string, label string) error DeleteCredential(accessToken string, realmName string, userID string, credentialID string) error ResetPapercardFailures(accessToken string, realmName string, userID string, credentialID string) error LinkShadowUser(accessToken string, realmName string, userID string, provider string, fedID kc.FederatedIdentityRepresentation) error ClearUserLoginFailures(accessToken string, realmName, userID string) error GetAttackDetectionStatus(accessToken string, realmName, userID string) (map[string]interface{}, error) }
KeycloakClient are methods from keycloak-client used by this component
type OnboardingModule ¶
type OnboardingModule interface { OnboardingAlreadyCompleted(kc.UserRepresentation) (bool, error) SendOnboardingEmail(ctx context.Context, accessToken string, realmName string, userID string, username string, onboardingClientID string, onboardingRedirectURI string, themeRealmName string, reminder bool, lifespan *int) error CreateUser(ctx context.Context, accessToken, realmName, targetRealmName string, kcUser *kc.UserRepresentation) (string, error) }
OnboardingModule is the interface for the onboarding process
type UsersDetailsDBModule ¶
type UsersDetailsDBModule interface { StoreOrUpdateUserDetails(ctx context.Context, realm string, user dto.DBUser) error GetUserDetails(ctx context.Context, realm string, userID string) (dto.DBUser, error) DeleteUserDetails(ctx context.Context, realm string, userID string) error GetChecks(ctx context.Context, realm string, userID string) ([]dto.DBCheck, error) }
UsersDetailsDBModule is the interface from the users module