Documentation
¶
Overview ¶
Package auth provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.
Index ¶
- Constants
- Variables
- func ArnMatch(src, dst string) bool
- func CheckPermission(resourceArn, username string, policies []*model.Policy, action string) bool
- func CopyUserFromContext(srcCtx, dstCtx context.Context) context.Context
- func EvaluateConditions(conditions map[string]map[string][]string, conditionCtx *ConditionContext) (bool, error)
- func GenerateJWTLogin(secret []byte, userID string, issuedAt, expiresAt time.Time) (string, error)
- func GetActionsForPolicyType(typ string) ([]string, error)
- func GetActionsForPolicyTypeOrDie(typ string) []string
- func GetOrCreateUser(ctx context.Context, logger logging.Logger, authService Service, ...) (*model.User, error)
- func GetUser(ctx context.Context) (*model.User, error)
- func HasActionOnAnyResource(policies []*model.Policy, action string) bool
- func MakeStatementForPolicyType(typ string, resources []string) (model.Statements, error)
- func MakeStatementForPolicyTypeOrDie(typ string, resources []string) model.Statements
- func NewAddGroupMembershipRequest(server string, groupId string, userId string) (*http.Request, error)
- func NewAttachPolicyToGroupRequest(server string, groupId string, policyId string) (*http.Request, error)
- func NewAttachPolicyToUserRequest(server string, userId string, policyId string) (*http.Request, error)
- func NewClaimTokenIdRequest(server string, body ClaimTokenIdJSONRequestBody) (*http.Request, error)
- func NewClaimTokenIdRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateCredentialsRequest(server string, userId string, params *CreateCredentialsParams) (*http.Request, error)
- func NewCreateGroupRequest(server string, body CreateGroupJSONRequestBody) (*http.Request, error)
- func NewCreateGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreatePolicyRequest(server string, body CreatePolicyJSONRequestBody) (*http.Request, error)
- func NewCreatePolicyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateUserExternalPrincipalRequest(server string, userId string, params *CreateUserExternalPrincipalParams) (*http.Request, error)
- func NewCreateUserRequest(server string, body CreateUserJSONRequestBody) (*http.Request, error)
- func NewCreateUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteCredentialsRequest(server string, userId string, accessKeyId string) (*http.Request, error)
- func NewDeleteGroupMembershipRequest(server string, groupId string, userId string) (*http.Request, error)
- func NewDeleteGroupRequest(server string, groupId string) (*http.Request, error)
- func NewDeletePolicyRequest(server string, policyId string) (*http.Request, error)
- func NewDeleteUserExternalPrincipalRequest(server string, userId string, params *DeleteUserExternalPrincipalParams) (*http.Request, error)
- func NewDeleteUserRequest(server string, userId string) (*http.Request, error)
- func NewDetachPolicyFromGroupRequest(server string, groupId string, policyId string) (*http.Request, error)
- func NewDetachPolicyFromUserRequest(server string, userId string, policyId string) (*http.Request, error)
- func NewGetCredentialsForUserRequest(server string, userId string, accessKeyId string) (*http.Request, error)
- func NewGetCredentialsRequest(server string, accessKeyId string) (*http.Request, error)
- func NewGetExternalPrincipalRequest(server string, params *GetExternalPrincipalParams) (*http.Request, error)
- func NewGetGroupRequest(server string, groupId string) (*http.Request, error)
- func NewGetPolicyRequest(server string, policyId string) (*http.Request, error)
- func NewGetUserRequest(server string, userId string) (*http.Request, error)
- func NewGetVersionRequest(server string) (*http.Request, error)
- func NewHealthCheckRequest(server string) (*http.Request, error)
- func NewListGroupMembersRequest(server string, groupId string, params *ListGroupMembersParams) (*http.Request, error)
- func NewListGroupPoliciesRequest(server string, groupId string, params *ListGroupPoliciesParams) (*http.Request, error)
- func NewListGroupsRequest(server string, params *ListGroupsParams) (*http.Request, error)
- func NewListPoliciesRequest(server string, params *ListPoliciesParams) (*http.Request, error)
- func NewListUserCredentialsRequest(server string, userId string, params *ListUserCredentialsParams) (*http.Request, error)
- func NewListUserExternalPrincipalsRequest(server string, userId string, params *ListUserExternalPrincipalsParams) (*http.Request, error)
- func NewListUserGroupsRequest(server string, userId string, params *ListUserGroupsParams) (*http.Request, error)
- func NewListUserPoliciesRequest(server string, userId string, params *ListUserPoliciesParams) (*http.Request, error)
- func NewListUsersRequest(server string, params *ListUsersParams) (*http.Request, error)
- func NewUpdatePasswordRequest(server string, userId string, body UpdatePasswordJSONRequestBody) (*http.Request, error)
- func NewUpdatePasswordRequestWithBody(server string, userId string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdatePolicyRequest(server string, policyId string, body UpdatePolicyJSONRequestBody) (*http.Request, error)
- func NewUpdatePolicyRequestWithBody(server string, policyId string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateUserFriendlyNameRequest(server string, userId string, body UpdateUserFriendlyNameJSONRequestBody) (*http.Request, error)
- func NewUpdateUserFriendlyNameRequestWithBody(server string, userId string, contentType string, body io.Reader) (*http.Request, error)
- func ObserveDuration(operation string, duration time.Duration, success bool)
- func ParsePolicyResourceAsList(resource string) ([]string, error)
- func UserByAuth(ctx context.Context, authenticator Authenticator, authService Service, ...) (*model.User, error)
- func UserByToken(ctx context.Context, authService Service, tokenString string) (*model.User, error)
- func WithUser(ctx context.Context, user *model.User) context.Context
- type APIAuthService
- func (a *APIAuthService) AddCredentials(ctx context.Context, username, accessKeyID, secretAccessKey string) (*model.Credential, error)
- func (a *APIAuthService) AddUserToGroup(ctx context.Context, username, groupID string) error
- func (a *APIAuthService) AttachPolicyToGroup(ctx context.Context, policyDisplayName, groupID string) error
- func (a *APIAuthService) AttachPolicyToUser(ctx context.Context, policyDisplayName, username string) error
- func (a *APIAuthService) Authorize(ctx context.Context, req *AuthorizationRequest) (*AuthorizationResponse, error)
- func (a *APIAuthService) Cache() Cache
- func (a *APIAuthService) CheckHealth(ctx context.Context, logger logging.Logger, timeout time.Duration) error
- func (a *APIAuthService) ClaimTokenIDOnce(ctx context.Context, tokenID string, expiresAt int64) error
- func (a *APIAuthService) CreateCredentials(ctx context.Context, username string) (*model.Credential, error)
- func (a *APIAuthService) CreateGroup(ctx context.Context, group *model.Group) (*model.Group, error)
- func (a *APIAuthService) CreateUser(ctx context.Context, user *model.User) (string, error)
- func (a *APIAuthService) CreateUserExternalPrincipal(ctx context.Context, userID, principalID string) error
- func (a *APIAuthService) DeleteCredentials(ctx context.Context, username, accessKeyID string) error
- func (a *APIAuthService) DeleteGroup(ctx context.Context, groupID string) error
- func (a *APIAuthService) DeletePolicy(ctx context.Context, policyDisplayName string) error
- func (a *APIAuthService) DeleteUser(ctx context.Context, username string) error
- func (a *APIAuthService) DeleteUserExternalPrincipal(ctx context.Context, userID, principalID string) error
- func (a *APIAuthService) DetachPolicyFromGroup(ctx context.Context, policyDisplayName, groupID string) error
- func (a *APIAuthService) DetachPolicyFromUser(ctx context.Context, policyDisplayName, username string) error
- func (a *APIAuthService) GetCredentials(ctx context.Context, accessKeyID string) (*model.Credential, error)
- func (a *APIAuthService) GetCredentialsForUser(ctx context.Context, username, accessKeyID string) (*model.Credential, error)
- func (a *APIAuthService) GetExternalPrincipal(ctx context.Context, principalID string) (*model.ExternalPrincipal, error)
- func (a *APIAuthService) GetGroup(ctx context.Context, groupID string) (*model.Group, error)
- func (a *APIAuthService) GetPolicy(ctx context.Context, policyDisplayName string) (*model.Policy, error)
- func (a *APIAuthService) GetUser(ctx context.Context, username string) (*model.User, error)
- func (a *APIAuthService) GetUserByEmail(ctx context.Context, email string) (*model.User, error)
- func (a *APIAuthService) GetUserByExternalID(ctx context.Context, externalID string) (*model.User, error)
- func (a *APIAuthService) GetUserByID(ctx context.Context, userID string) (*model.User, error)
- func (a *APIAuthService) InviteUser(ctx context.Context, email string) error
- func (a *APIAuthService) IsAdvancedAuth() bool
- func (a *APIAuthService) IsExternalPrincipalsEnabled(_ context.Context) bool
- func (a *APIAuthService) ListEffectivePolicies(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (a *APIAuthService) ListGroupPolicies(ctx context.Context, groupID string, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (a *APIAuthService) ListGroupUsers(ctx context.Context, groupID string, params *model.PaginationParams) ([]*model.User, *model.Paginator, error)
- func (a *APIAuthService) ListGroups(ctx context.Context, params *model.PaginationParams) ([]*model.Group, *model.Paginator, error)
- func (a *APIAuthService) ListPolicies(ctx context.Context, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (a *APIAuthService) ListUserCredentials(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Credential, *model.Paginator, error)
- func (a *APIAuthService) ListUserExternalPrincipals(ctx context.Context, userID string, params *model.PaginationParams) ([]*model.ExternalPrincipal, *model.Paginator, error)
- func (a *APIAuthService) ListUserGroups(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Group, *model.Paginator, error)
- func (a *APIAuthService) ListUserPolicies(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (a *APIAuthService) ListUsers(ctx context.Context, params *model.PaginationParams) ([]*model.User, *model.Paginator, error)
- func (a *APIAuthService) RemoveUserFromGroup(ctx context.Context, username, groupID string) error
- func (a *APIAuthService) SecretStore() crypt.SecretStore
- func (a *APIAuthService) UpdateUserFriendlyName(ctx context.Context, userID string, friendlyName string) error
- func (a *APIAuthService) WritePolicy(ctx context.Context, policy *model.Policy, update bool) error
- type AddGroupMembershipResponse
- type Arn
- type AttachPolicyToGroupResponse
- type AttachPolicyToUserResponse
- type Authenticator
- type AuthorizationRequest
- type AuthorizationResponse
- type Authorizer
- type BasicAuthService
- func (s *BasicAuthService) AddCredentials(ctx context.Context, username, accessKeyID, secretAccessKey string) (*model.Credential, error)
- func (s *BasicAuthService) AddUserToGroup(_ context.Context, _, _ string) error
- func (s *BasicAuthService) AttachPolicyToGroup(_ context.Context, _, _ string) error
- func (s *BasicAuthService) AttachPolicyToUser(_ context.Context, _, _ string) error
- func (s *BasicAuthService) Authorize(ctx context.Context, req *AuthorizationRequest) (*AuthorizationResponse, error)
- func (s *BasicAuthService) Cache() Cache
- func (s *BasicAuthService) ClaimTokenIDOnce(_ context.Context, _ string, _ int64) error
- func (s *BasicAuthService) CreateCredentials(ctx context.Context, username string) (*model.Credential, error)
- func (s *BasicAuthService) CreateGroup(_ context.Context, _ *model.Group) (*model.Group, error)
- func (s *BasicAuthService) CreateUser(ctx context.Context, user *model.User) (string, error)
- func (s *BasicAuthService) CreateUserExternalPrincipal(_ context.Context, _, _ string) error
- func (s *BasicAuthService) DeleteCredentials(_ context.Context, _, _ string) error
- func (s *BasicAuthService) DeleteGroup(_ context.Context, _ string) error
- func (s *BasicAuthService) DeletePolicy(_ context.Context, _ string) error
- func (s *BasicAuthService) DeleteUser(ctx context.Context, username string) error
- func (s *BasicAuthService) DeleteUserExternalPrincipal(_ context.Context, _, _ string) error
- func (s *BasicAuthService) DetachPolicyFromGroup(_ context.Context, _, _ string) error
- func (s *BasicAuthService) DetachPolicyFromUser(_ context.Context, _, _ string) error
- func (s *BasicAuthService) GetCredentials(ctx context.Context, accessKeyID string) (*model.Credential, error)
- func (s *BasicAuthService) GetCredentialsForUser(ctx context.Context, username, accessKeyID string) (*model.Credential, error)
- func (s *BasicAuthService) GetExternalPrincipal(_ context.Context, _ string) (*model.ExternalPrincipal, error)
- func (s *BasicAuthService) GetGroup(_ context.Context, _ string) (*model.Group, error)
- func (s *BasicAuthService) GetPolicy(_ context.Context, _ string) (*model.Policy, error)
- func (s *BasicAuthService) GetUser(ctx context.Context, username string) (*model.User, error)
- func (s *BasicAuthService) GetUserByEmail(_ context.Context, _ string) (*model.User, error)
- func (s *BasicAuthService) GetUserByExternalID(_ context.Context, _ string) (*model.User, error)
- func (s *BasicAuthService) GetUserByID(_ context.Context, _ string) (*model.User, error)
- func (s *BasicAuthService) IsAdvancedAuth() bool
- func (s *BasicAuthService) IsExternalPrincipalsEnabled(_ context.Context) bool
- func (s *BasicAuthService) ListEffectivePolicies(_ context.Context, _ string, _ *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (s *BasicAuthService) ListGroupPolicies(context.Context, string, *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (s *BasicAuthService) ListGroupUsers(_ context.Context, _ string, _ *model.PaginationParams) ([]*model.User, *model.Paginator, error)
- func (s *BasicAuthService) ListGroups(_ context.Context, _ *model.PaginationParams) ([]*model.Group, *model.Paginator, error)
- func (s *BasicAuthService) ListPolicies(_ context.Context, _ *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (s *BasicAuthService) ListUserCredentials(_ context.Context, _ string, _ *model.PaginationParams) ([]*model.Credential, *model.Paginator, error)
- func (s *BasicAuthService) ListUserExternalPrincipals(_ context.Context, _ string, _ *model.PaginationParams) ([]*model.ExternalPrincipal, *model.Paginator, error)
- func (s *BasicAuthService) ListUserGroups(_ context.Context, _ string, _ *model.PaginationParams) ([]*model.Group, *model.Paginator, error)
- func (s *BasicAuthService) ListUserPolicies(_ context.Context, _ string, _ *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (s *BasicAuthService) ListUsers(ctx context.Context, _ *model.PaginationParams) ([]*model.User, *model.Paginator, error)
- func (s *BasicAuthService) Migrate(ctx context.Context) (string, error)
- func (s *BasicAuthService) RemoveUserFromGroup(_ context.Context, _, _ string) error
- func (s *BasicAuthService) SecretStore() crypt.SecretStore
- func (s *BasicAuthService) UpdateUserFriendlyName(_ context.Context, _ string, _ string) error
- func (s *BasicAuthService) WritePolicy(_ context.Context, _ *model.Policy, _ bool) error
- type BuiltinAuthenticator
- type Cache
- type ChainAuthenticator
- type CheckResult
- type ClaimTokenId
- type ClaimTokenIdJSONBody
- type ClaimTokenIdJSONRequestBody
- type ClaimTokenIdResponse
- type Client
- func (c *Client) AddGroupMembership(ctx context.Context, groupId string, userId string, ...) (*http.Response, error)
- func (c *Client) AttachPolicyToGroup(ctx context.Context, groupId string, policyId string, ...) (*http.Response, error)
- func (c *Client) AttachPolicyToUser(ctx context.Context, userId string, policyId string, ...) (*http.Response, error)
- func (c *Client) ClaimTokenId(ctx context.Context, body ClaimTokenIdJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ClaimTokenIdWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateCredentials(ctx context.Context, userId string, params *CreateCredentialsParams, ...) (*http.Response, error)
- func (c *Client) CreateGroup(ctx context.Context, body CreateGroupJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateGroupWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreatePolicy(ctx context.Context, body CreatePolicyJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreatePolicyWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateUser(ctx context.Context, body CreateUserJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateUserExternalPrincipal(ctx context.Context, userId string, params *CreateUserExternalPrincipalParams, ...) (*http.Response, error)
- func (c *Client) CreateUserWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteCredentials(ctx context.Context, userId string, accessKeyId string, ...) (*http.Response, error)
- func (c *Client) DeleteGroup(ctx context.Context, groupId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteGroupMembership(ctx context.Context, groupId string, userId string, ...) (*http.Response, error)
- func (c *Client) DeletePolicy(ctx context.Context, policyId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteUser(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteUserExternalPrincipal(ctx context.Context, userId string, params *DeleteUserExternalPrincipalParams, ...) (*http.Response, error)
- func (c *Client) DetachPolicyFromGroup(ctx context.Context, groupId string, policyId string, ...) (*http.Response, error)
- func (c *Client) DetachPolicyFromUser(ctx context.Context, userId string, policyId string, ...) (*http.Response, error)
- func (c *Client) GetCredentials(ctx context.Context, accessKeyId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetCredentialsForUser(ctx context.Context, userId string, accessKeyId string, ...) (*http.Response, error)
- func (c *Client) GetExternalPrincipal(ctx context.Context, params *GetExternalPrincipalParams, ...) (*http.Response, error)
- func (c *Client) GetGroup(ctx context.Context, groupId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetPolicy(ctx context.Context, policyId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetUser(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetVersion(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListGroupMembers(ctx context.Context, groupId string, params *ListGroupMembersParams, ...) (*http.Response, error)
- func (c *Client) ListGroupPolicies(ctx context.Context, groupId string, params *ListGroupPoliciesParams, ...) (*http.Response, error)
- func (c *Client) ListGroups(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListPolicies(ctx context.Context, params *ListPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListUserCredentials(ctx context.Context, userId string, params *ListUserCredentialsParams, ...) (*http.Response, error)
- func (c *Client) ListUserExternalPrincipals(ctx context.Context, userId string, params *ListUserExternalPrincipalsParams, ...) (*http.Response, error)
- func (c *Client) ListUserGroups(ctx context.Context, userId string, params *ListUserGroupsParams, ...) (*http.Response, error)
- func (c *Client) ListUserPolicies(ctx context.Context, userId string, params *ListUserPoliciesParams, ...) (*http.Response, error)
- func (c *Client) ListUsers(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdatePassword(ctx context.Context, userId string, body UpdatePasswordJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdatePasswordWithBody(ctx context.Context, userId string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdatePolicy(ctx context.Context, policyId string, body UpdatePolicyJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdatePolicyWithBody(ctx context.Context, policyId string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateUserFriendlyName(ctx context.Context, userId string, body UpdateUserFriendlyNameJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateUserFriendlyNameWithBody(ctx context.Context, userId string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) AddGroupMembershipWithResponse(ctx context.Context, groupId string, userId string, ...) (*AddGroupMembershipResponse, error)
- func (c *ClientWithResponses) AttachPolicyToGroupWithResponse(ctx context.Context, groupId string, policyId string, ...) (*AttachPolicyToGroupResponse, error)
- func (c *ClientWithResponses) AttachPolicyToUserWithResponse(ctx context.Context, userId string, policyId string, ...) (*AttachPolicyToUserResponse, error)
- func (c *ClientWithResponses) ClaimTokenIdWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*ClaimTokenIdResponse, error)
- func (c *ClientWithResponses) ClaimTokenIdWithResponse(ctx context.Context, body ClaimTokenIdJSONRequestBody, ...) (*ClaimTokenIdResponse, error)
- func (c *ClientWithResponses) CreateCredentialsWithResponse(ctx context.Context, userId string, params *CreateCredentialsParams, ...) (*CreateCredentialsResponse, error)
- func (c *ClientWithResponses) CreateGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateGroupResponse, error)
- func (c *ClientWithResponses) CreateGroupWithResponse(ctx context.Context, body CreateGroupJSONRequestBody, ...) (*CreateGroupResponse, error)
- func (c *ClientWithResponses) CreatePolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreatePolicyResponse, error)
- func (c *ClientWithResponses) CreatePolicyWithResponse(ctx context.Context, body CreatePolicyJSONRequestBody, ...) (*CreatePolicyResponse, error)
- func (c *ClientWithResponses) CreateUserExternalPrincipalWithResponse(ctx context.Context, userId string, params *CreateUserExternalPrincipalParams, ...) (*CreateUserExternalPrincipalResponse, error)
- func (c *ClientWithResponses) CreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateUserResponse, error)
- func (c *ClientWithResponses) CreateUserWithResponse(ctx context.Context, body CreateUserJSONRequestBody, ...) (*CreateUserResponse, error)
- func (c *ClientWithResponses) DeleteCredentialsWithResponse(ctx context.Context, userId string, accessKeyId string, ...) (*DeleteCredentialsResponse, error)
- func (c *ClientWithResponses) DeleteGroupMembershipWithResponse(ctx context.Context, groupId string, userId string, ...) (*DeleteGroupMembershipResponse, error)
- func (c *ClientWithResponses) DeleteGroupWithResponse(ctx context.Context, groupId string, reqEditors ...RequestEditorFn) (*DeleteGroupResponse, error)
- func (c *ClientWithResponses) DeletePolicyWithResponse(ctx context.Context, policyId string, reqEditors ...RequestEditorFn) (*DeletePolicyResponse, error)
- func (c *ClientWithResponses) DeleteUserExternalPrincipalWithResponse(ctx context.Context, userId string, params *DeleteUserExternalPrincipalParams, ...) (*DeleteUserExternalPrincipalResponse, error)
- func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)
- func (c *ClientWithResponses) DetachPolicyFromGroupWithResponse(ctx context.Context, groupId string, policyId string, ...) (*DetachPolicyFromGroupResponse, error)
- func (c *ClientWithResponses) DetachPolicyFromUserWithResponse(ctx context.Context, userId string, policyId string, ...) (*DetachPolicyFromUserResponse, error)
- func (c *ClientWithResponses) GetCredentialsForUserWithResponse(ctx context.Context, userId string, accessKeyId string, ...) (*GetCredentialsForUserResponse, error)
- func (c *ClientWithResponses) GetCredentialsWithResponse(ctx context.Context, accessKeyId string, reqEditors ...RequestEditorFn) (*GetCredentialsResponse, error)
- func (c *ClientWithResponses) GetExternalPrincipalWithResponse(ctx context.Context, params *GetExternalPrincipalParams, ...) (*GetExternalPrincipalResponse, error)
- func (c *ClientWithResponses) GetGroupWithResponse(ctx context.Context, groupId string, reqEditors ...RequestEditorFn) (*GetGroupResponse, error)
- func (c *ClientWithResponses) GetPolicyWithResponse(ctx context.Context, policyId string, reqEditors ...RequestEditorFn) (*GetPolicyResponse, error)
- func (c *ClientWithResponses) GetUserWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*GetUserResponse, error)
- func (c *ClientWithResponses) GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResponse, error)
- func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error)
- func (c *ClientWithResponses) ListGroupMembersWithResponse(ctx context.Context, groupId string, params *ListGroupMembersParams, ...) (*ListGroupMembersResponse, error)
- func (c *ClientWithResponses) ListGroupPoliciesWithResponse(ctx context.Context, groupId string, params *ListGroupPoliciesParams, ...) (*ListGroupPoliciesResponse, error)
- func (c *ClientWithResponses) ListGroupsWithResponse(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*ListGroupsResponse, error)
- func (c *ClientWithResponses) ListPoliciesWithResponse(ctx context.Context, params *ListPoliciesParams, reqEditors ...RequestEditorFn) (*ListPoliciesResponse, error)
- func (c *ClientWithResponses) ListUserCredentialsWithResponse(ctx context.Context, userId string, params *ListUserCredentialsParams, ...) (*ListUserCredentialsResponse, error)
- func (c *ClientWithResponses) ListUserExternalPrincipalsWithResponse(ctx context.Context, userId string, params *ListUserExternalPrincipalsParams, ...) (*ListUserExternalPrincipalsResponse, error)
- func (c *ClientWithResponses) ListUserGroupsWithResponse(ctx context.Context, userId string, params *ListUserGroupsParams, ...) (*ListUserGroupsResponse, error)
- func (c *ClientWithResponses) ListUserPoliciesWithResponse(ctx context.Context, userId string, params *ListUserPoliciesParams, ...) (*ListUserPoliciesResponse, error)
- func (c *ClientWithResponses) ListUsersWithResponse(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*ListUsersResponse, error)
- func (c *ClientWithResponses) UpdatePasswordWithBodyWithResponse(ctx context.Context, userId string, contentType string, body io.Reader, ...) (*UpdatePasswordResponse, error)
- func (c *ClientWithResponses) UpdatePasswordWithResponse(ctx context.Context, userId string, body UpdatePasswordJSONRequestBody, ...) (*UpdatePasswordResponse, error)
- func (c *ClientWithResponses) UpdatePolicyWithBodyWithResponse(ctx context.Context, policyId string, contentType string, body io.Reader, ...) (*UpdatePolicyResponse, error)
- func (c *ClientWithResponses) UpdatePolicyWithResponse(ctx context.Context, policyId string, body UpdatePolicyJSONRequestBody, ...) (*UpdatePolicyResponse, error)
- func (c *ClientWithResponses) UpdateUserFriendlyNameWithBodyWithResponse(ctx context.Context, userId string, contentType string, body io.Reader, ...) (*UpdateUserFriendlyNameResponse, error)
- func (c *ClientWithResponses) UpdateUserFriendlyNameWithResponse(ctx context.Context, userId string, body UpdateUserFriendlyNameJSONRequestBody, ...) (*UpdateUserFriendlyNameResponse, error)
- type ClientWithResponsesInterface
- type CommPrefs
- type ConditionContext
- type ConditionOperator
- type Conflict
- type CreateCredentialsParams
- type CreateCredentialsResponse
- type CreateGroupJSONBody
- type CreateGroupJSONRequestBody
- type CreateGroupResponse
- type CreatePolicyJSONBody
- type CreatePolicyJSONRequestBody
- type CreatePolicyResponse
- type CreateUserExternalPrincipalParams
- type CreateUserExternalPrincipalResponse
- type CreateUserJSONBody
- type CreateUserJSONRequestBody
- type CreateUserResponse
- type CredentialSetFn
- type Credentialler
- type Credentials
- type CredentialsCreator
- type CredentialsList
- type CredentialsWithSecret
- type DeleteCredentialsResponse
- type DeleteGroupMembershipResponse
- type DeleteGroupResponse
- type DeletePolicyResponse
- type DeleteUserExternalPrincipalParams
- type DeleteUserExternalPrincipalResponse
- type DeleteUserResponse
- type DetachPolicyFromGroupResponse
- type DetachPolicyFromUserResponse
- type DummyCache
- func (d *DummyCache) GetCredential(_ string, setFn CredentialSetFn) (*model.Credential, error)
- func (d *DummyCache) GetExternalPrincipal(_ string, setFn ExternalPrincipalFn) (*model.ExternalPrincipal, error)
- func (d *DummyCache) GetUser(_ UserKey, setFn UserSetFn) (*model.User, error)
- func (d *DummyCache) GetUserPolicies(_ string, setFn UserPoliciesSetFn) ([]*model.Policy, error)
- type EmailInviter
- type Error
- type ExternalPrincipal
- type ExternalPrincipalFn
- type ExternalPrincipalList
- type ExternalPrincipalsService
- type GatewayService
- type GetCredentialsForUserResponse
- type GetCredentialsResponse
- type GetExternalPrincipalParams
- type GetExternalPrincipalResponse
- type GetGroupResponse
- type GetPolicyResponse
- type GetUserResponse
- type GetVersionResponse
- type Group
- type GroupCreation
- type GroupList
- type HealthCheckResponse
- type HttpRequestDoer
- type IpAddressOperator
- type KVMetadataManager
- func (m *KVMetadataManager) GetCommPrefs(ctx context.Context) (CommPrefs, error)
- func (m *KVMetadataManager) GetMetadata(ctx context.Context) (map[string]string, error)
- func (m *KVMetadataManager) GetSetupState(ctx context.Context) (SetupStateName, error)
- func (m *KVMetadataManager) IsCommPrefsSet(ctx context.Context) (bool, error)
- func (m *KVMetadataManager) IsInitialized(ctx context.Context) (bool, error)
- func (m *KVMetadataManager) UpdateCommPrefs(ctx context.Context, commPrefs *CommPrefs) (string, error)
- func (m *KVMetadataManager) UpdateSetupTimestamp(ctx context.Context, setupTime time.Time, authType string) error
- type LRUCache
- func (c *LRUCache) GetCredential(accessKeyID string, setFn CredentialSetFn) (*model.Credential, error)
- func (c *LRUCache) GetExternalPrincipal(key string, setFn ExternalPrincipalFn) (*model.ExternalPrincipal, error)
- func (c *LRUCache) GetUser(key UserKey, setFn UserSetFn) (*model.User, error)
- func (c *LRUCache) GetUserPolicies(userID string, setFn UserPoliciesSetFn) ([]*model.Policy, error)
- type ListGroupMembersParams
- type ListGroupMembersResponse
- type ListGroupPoliciesParams
- type ListGroupPoliciesResponse
- type ListGroupsParams
- type ListGroupsResponse
- type ListPoliciesParams
- type ListPoliciesResponse
- type ListUserCredentialsParams
- type ListUserCredentialsResponse
- type ListUserExternalPrincipalsParams
- type ListUserExternalPrincipalsResponse
- type ListUserGroupsParams
- type ListUserGroupsResponse
- type ListUserPoliciesParams
- type ListUserPoliciesResponse
- type ListUsersParams
- type ListUsersResponse
- type LoginClaims
- func (lc LoginClaims) GetAudience() (jwt.ClaimStrings, error)
- func (lc LoginClaims) GetExpirationTime() (*jwt.NumericDate, error)
- func (lc LoginClaims) GetIssuedAt() (*jwt.NumericDate, error)
- func (lc LoginClaims) GetIssuer() (string, error)
- func (lc LoginClaims) GetNotBefore() (*jwt.NumericDate, error)
- func (lc LoginClaims) GetSubject() (string, error)
- type MetadataManager
- type MissingPermissions
- type MonitoredService
- func (w *MonitoredService) AddCredentials(ctx context.Context, username string, accessKeyID string, ...) (*model.Credential, error)
- func (w *MonitoredService) AddUserToGroup(ctx context.Context, username string, groupID string) error
- func (w *MonitoredService) AttachPolicyToGroup(ctx context.Context, policyDisplayName string, groupID string) error
- func (w *MonitoredService) AttachPolicyToUser(ctx context.Context, policyDisplayName string, username string) error
- func (w *MonitoredService) Authorize(ctx context.Context, req *AuthorizationRequest) (*AuthorizationResponse, error)
- func (w *MonitoredService) Cache() Cache
- func (w *MonitoredService) ClaimTokenIDOnce(ctx context.Context, tokenID string, expiresAt int64) error
- func (w *MonitoredService) CreateCredentials(ctx context.Context, username string) (*model.Credential, error)
- func (w *MonitoredService) CreateGroup(ctx context.Context, group *model.Group) (*model.Group, error)
- func (w *MonitoredService) CreateUser(ctx context.Context, user *model.User) (string, error)
- func (w *MonitoredService) CreateUserExternalPrincipal(ctx context.Context, userID string, principalID string) error
- func (w *MonitoredService) DeleteCredentials(ctx context.Context, username string, accessKeyID string) error
- func (w *MonitoredService) DeleteGroup(ctx context.Context, groupID string) error
- func (w *MonitoredService) DeletePolicy(ctx context.Context, policyDisplayName string) error
- func (w *MonitoredService) DeleteUser(ctx context.Context, username string) error
- func (w *MonitoredService) DeleteUserExternalPrincipal(ctx context.Context, userID string, principalID string) error
- func (w *MonitoredService) DetachPolicyFromGroup(ctx context.Context, policyDisplayName string, groupID string) error
- func (w *MonitoredService) DetachPolicyFromUser(ctx context.Context, policyDisplayName string, username string) error
- func (w *MonitoredService) GetCredentials(ctx context.Context, accessKeyID string) (*model.Credential, error)
- func (w *MonitoredService) GetCredentialsForUser(ctx context.Context, username string, accessKeyID string) (*model.Credential, error)
- func (w *MonitoredService) GetExternalPrincipal(ctx context.Context, principalID string) (*model.ExternalPrincipal, error)
- func (w *MonitoredService) GetGroup(ctx context.Context, groupID string) (*model.Group, error)
- func (w *MonitoredService) GetPolicy(ctx context.Context, policyDisplayName string) (*model.Policy, error)
- func (w *MonitoredService) GetUser(ctx context.Context, username string) (*model.User, error)
- func (w *MonitoredService) GetUserByEmail(ctx context.Context, email string) (*model.User, error)
- func (w *MonitoredService) GetUserByExternalID(ctx context.Context, externalID string) (*model.User, error)
- func (w *MonitoredService) GetUserByID(ctx context.Context, userID string) (*model.User, error)
- func (w *MonitoredService) IsAdvancedAuth() bool
- func (w *MonitoredService) IsExternalPrincipalsEnabled(ctx context.Context) bool
- func (w *MonitoredService) ListEffectivePolicies(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (w *MonitoredService) ListGroupPolicies(ctx context.Context, groupID string, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (w *MonitoredService) ListGroupUsers(ctx context.Context, groupID string, params *model.PaginationParams) ([]*model.User, *model.Paginator, error)
- func (w *MonitoredService) ListGroups(ctx context.Context, params *model.PaginationParams) ([]*model.Group, *model.Paginator, error)
- func (w *MonitoredService) ListPolicies(ctx context.Context, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (w *MonitoredService) ListUserCredentials(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Credential, *model.Paginator, error)
- func (w *MonitoredService) ListUserExternalPrincipals(ctx context.Context, userID string, params *model.PaginationParams) ([]*model.ExternalPrincipal, *model.Paginator, error)
- func (w *MonitoredService) ListUserGroups(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Group, *model.Paginator, error)
- func (w *MonitoredService) ListUserPolicies(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (w *MonitoredService) ListUsers(ctx context.Context, params *model.PaginationParams) ([]*model.User, *model.Paginator, error)
- func (w *MonitoredService) RemoveUserFromGroup(ctx context.Context, username string, groupID string) error
- func (w *MonitoredService) SecretStore() crypt.SecretStore
- func (w *MonitoredService) UpdateUserFriendlyName(ctx context.Context, userID string, friendlyName string) error
- func (w *MonitoredService) WritePolicy(ctx context.Context, policy *model.Policy, update bool) error
- type MonitoredServiceAndInviter
- func (w *MonitoredServiceAndInviter) AddCredentials(ctx context.Context, username string, accessKeyID string, ...) (*model.Credential, error)
- func (w *MonitoredServiceAndInviter) AddUserToGroup(ctx context.Context, username string, groupID string) error
- func (w *MonitoredServiceAndInviter) AttachPolicyToGroup(ctx context.Context, policyDisplayName string, groupID string) error
- func (w *MonitoredServiceAndInviter) AttachPolicyToUser(ctx context.Context, policyDisplayName string, username string) error
- func (w *MonitoredServiceAndInviter) Authorize(ctx context.Context, req *AuthorizationRequest) (*AuthorizationResponse, error)
- func (w *MonitoredServiceAndInviter) Cache() Cache
- func (w *MonitoredServiceAndInviter) ClaimTokenIDOnce(ctx context.Context, tokenID string, expiresAt int64) error
- func (w *MonitoredServiceAndInviter) CreateCredentials(ctx context.Context, username string) (*model.Credential, error)
- func (w *MonitoredServiceAndInviter) CreateGroup(ctx context.Context, group *model.Group) (*model.Group, error)
- func (w *MonitoredServiceAndInviter) CreateUser(ctx context.Context, user *model.User) (string, error)
- func (w *MonitoredServiceAndInviter) CreateUserExternalPrincipal(ctx context.Context, userID string, principalID string) error
- func (w *MonitoredServiceAndInviter) DeleteCredentials(ctx context.Context, username string, accessKeyID string) error
- func (w *MonitoredServiceAndInviter) DeleteGroup(ctx context.Context, groupID string) error
- func (w *MonitoredServiceAndInviter) DeletePolicy(ctx context.Context, policyDisplayName string) error
- func (w *MonitoredServiceAndInviter) DeleteUser(ctx context.Context, username string) error
- func (w *MonitoredServiceAndInviter) DeleteUserExternalPrincipal(ctx context.Context, userID string, principalID string) error
- func (w *MonitoredServiceAndInviter) DetachPolicyFromGroup(ctx context.Context, policyDisplayName string, groupID string) error
- func (w *MonitoredServiceAndInviter) DetachPolicyFromUser(ctx context.Context, policyDisplayName string, username string) error
- func (w *MonitoredServiceAndInviter) GetCredentials(ctx context.Context, accessKeyID string) (*model.Credential, error)
- func (w *MonitoredServiceAndInviter) GetCredentialsForUser(ctx context.Context, username string, accessKeyID string) (*model.Credential, error)
- func (w *MonitoredServiceAndInviter) GetExternalPrincipal(ctx context.Context, principalID string) (*model.ExternalPrincipal, error)
- func (w *MonitoredServiceAndInviter) GetGroup(ctx context.Context, groupID string) (*model.Group, error)
- func (w *MonitoredServiceAndInviter) GetPolicy(ctx context.Context, policyDisplayName string) (*model.Policy, error)
- func (w *MonitoredServiceAndInviter) GetUser(ctx context.Context, username string) (*model.User, error)
- func (w *MonitoredServiceAndInviter) GetUserByEmail(ctx context.Context, email string) (*model.User, error)
- func (w *MonitoredServiceAndInviter) GetUserByExternalID(ctx context.Context, externalID string) (*model.User, error)
- func (w *MonitoredServiceAndInviter) GetUserByID(ctx context.Context, userID string) (*model.User, error)
- func (w *MonitoredServiceAndInviter) InviteUser(ctx context.Context, email string) error
- func (w *MonitoredServiceAndInviter) IsAdvancedAuth() bool
- func (w *MonitoredServiceAndInviter) IsExternalPrincipalsEnabled(ctx context.Context) bool
- func (w *MonitoredServiceAndInviter) ListEffectivePolicies(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (w *MonitoredServiceAndInviter) ListGroupPolicies(ctx context.Context, groupID string, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (w *MonitoredServiceAndInviter) ListGroupUsers(ctx context.Context, groupID string, params *model.PaginationParams) ([]*model.User, *model.Paginator, error)
- func (w *MonitoredServiceAndInviter) ListGroups(ctx context.Context, params *model.PaginationParams) ([]*model.Group, *model.Paginator, error)
- func (w *MonitoredServiceAndInviter) ListPolicies(ctx context.Context, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (w *MonitoredServiceAndInviter) ListUserCredentials(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Credential, *model.Paginator, error)
- func (w *MonitoredServiceAndInviter) ListUserExternalPrincipals(ctx context.Context, userID string, params *model.PaginationParams) ([]*model.ExternalPrincipal, *model.Paginator, error)
- func (w *MonitoredServiceAndInviter) ListUserGroups(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Group, *model.Paginator, error)
- func (w *MonitoredServiceAndInviter) ListUserPolicies(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
- func (w *MonitoredServiceAndInviter) ListUsers(ctx context.Context, params *model.PaginationParams) ([]*model.User, *model.Paginator, error)
- func (w *MonitoredServiceAndInviter) RemoveUserFromGroup(ctx context.Context, username string, groupID string) error
- func (w *MonitoredServiceAndInviter) SecretStore() crypt.SecretStore
- func (w *MonitoredServiceAndInviter) UpdateUserFriendlyName(ctx context.Context, userID string, friendlyName string) error
- func (w *MonitoredServiceAndInviter) WritePolicy(ctx context.Context, policy *model.Policy, update bool) error
- type NotFound
- type Pagination
- type PaginationAfter
- type PaginationAmount
- type PaginationPrefix
- type Policy
- type PolicyCondition
- type PolicyList
- type RequestEditorFn
- type ServerError
- type Service
- type ServiceAndInviter
- type SetupStateName
- type Statement
- type Statement_Condition
- type Unauthorized
- type UpdatePasswordJSONBody
- type UpdatePasswordJSONRequestBody
- type UpdatePasswordResponse
- type UpdatePolicyJSONBody
- type UpdatePolicyJSONRequestBody
- type UpdatePolicyResponse
- type UpdateUserFriendlyNameJSONBody
- type UpdateUserFriendlyNameJSONRequestBody
- type UpdateUserFriendlyNameResponse
- type User
- type UserCreation
- type UserKey
- type UserList
- type UserPassword
- type UserPoliciesSetFn
- type UserSetFn
- type ValidationError
- type VersionConfig
- Bugs
Constants ¶
const ( BasicPartitionKey = "basicAuth" SuperAdminKey = "superAdmin" MaxUsers = 1 MaxCredentialsPerUser = 1 )
const ( OperatorNameIpAddress = "IpAddress" OperatorNameNotIpAddress = "NotIpAddress" )
const ( InstallationIDKeyName = "installation_id" SetupTimestampKeyName = "setup_timestamp" SetupAuthTypeKeyPrefix = "setup_auth_" CommPrefsSetKeyName = "comm_prefs_set" EmailKeyName = "encoded_user_email" FeatureUpdatesKeyName = "feature_updates" SecurityUpdatesKeyName = "security_updates" InstrumentationSamplesRepo = "SamplesRepo" InstrumentationQuickstart = "Quickstart" InstrumentationRun = "Run" )
const ( UserNotAllowed = "not allowed" InvalidUserID = "" MaxPage = 1000 // CheckAllow Permission allowed CheckAllow CheckResult = iota // CheckNeutral Permission neither allowed nor denied CheckNeutral // CheckDeny Permission denied CheckDeny )
const (
Jwt_tokenScopes = "jwt_token.Scopes"
)
const (
LoginAudience = "login"
)
Variables ¶
var ( ErrMissingFieldName = errors.New("missing field name") ErrInvalidIPCIDRFormat = errors.New("invalid IP/CIDR format") ErrInvalidConditionContext = errors.New("invalid condition context") ErrInvalidIPFormat = errors.New("invalid IP format") ErrUnsupportedConditionOperator = errors.New("unsupported condition operator") )
var ( ErrNotFound = kv.ErrNotFound ErrAlreadyExists = errors.New("already exists") ErrNonUnique = errors.New("more than one user found") ErrInvalidArn = errors.New("invalid ARN") ErrInsufficientPermissions = errors.New("insufficient permissions") ErrInvalidAccessKeyID = errors.New("invalid access key ID") ErrInvalidSecretAccessKey = errors.New("invalid secret access key") ErrUnexpectedStatusCode = errors.New("unexpected status code") ErrUnexpectedSigningMethod = errors.New("unexpected signing method") ErrInvalidToken = errors.New("invalid token") ErrInvalidRequest = errors.New("invalid request") ErrUserNotFound = errors.New("user not found") ErrInvalidResponse = errors.New("invalid response") ErrNotImplemented = errors.New("not implemented") ErrMigrationNotPossible = errors.New("auth migration not possible") ErrInternalServerError = errors.New("internal server error") ErrAuthenticatingRequest = errors.New("error authenticating request") )
var DockeEnvExists = "/.dockerenv"
DockeEnvExists For testing purposes
var (
ErrStatementNotFound = errors.New("statement not found")
)
Functions ¶
func CheckPermission ¶ added in v1.77.0
CheckPermission checks if a user has a specific action permission on a resource. Returns true if allowed, false if denied or not permitted. This evaluates policies similar to CheckPermissions but optimized for filtering.
func CopyUserFromContext ¶ added in v1.75.0
func EvaluateConditions ¶ added in v1.71.0
func EvaluateConditions(conditions map[string]map[string][]string, conditionCtx *ConditionContext) (bool, error)
EvaluateConditions checks if all conditions in the map are satisfied conditions is a map where keys are operator names and values are maps of field names to value arrays AWS IAM format: {"IpAddress": {"SourceIp": ["203.0.113.0/24", "198.51.100.25/32"]}} Returns true only if all conditions pass (AND logic)
func GenerateJWTLogin ¶ added in v1.53.0
GenerateJWTLogin creates a jwt token which can be used for authentication during login only, i.e. it will not work for password reset. It supports backward compatibility for creating a login jwt. The audience is set for login token. No email is passed to support the ability of login for users via user/access keys which don't have an email yet
func GetActionsForPolicyType ¶ added in v0.98.0
GetActionsForPolicyType returns the actions for police type typ.
func GetActionsForPolicyTypeOrDie ¶ added in v0.98.0
func GetOrCreateUser ¶ added in v1.53.0
func GetOrCreateUser(ctx context.Context, logger logging.Logger, authService Service, username, friendlyName, userGroup, source string) (*model.User, error)
GetOrCreateUser searches for the user by username, and if not found, creates a new user with the given username and external user identifier. It returns the username of the user. This function is meant to be used by Authenticator implementations in the ChainAuthenticator.
func HasActionOnAnyResource ¶ added in v1.77.0
HasActionOnAnyResource checks if a user has a specific action on ANY resource. This is used for list-type operations where we want to verify the user has some permission before filtering results, rather than requiring wildcard access. Returns true if the user has at least one allow statement for the action.
func MakeStatementForPolicyType ¶ added in v0.98.0
func MakeStatementForPolicyType(typ string, resources []string) (model.Statements, error)
MakeStatementForPolicyType returns statements for policy type typ, limited to resources.
func MakeStatementForPolicyTypeOrDie ¶ added in v0.98.0
func MakeStatementForPolicyTypeOrDie(typ string, resources []string) model.Statements
func NewAddGroupMembershipRequest ¶ added in v1.77.0
func NewAddGroupMembershipRequest(server string, groupId string, userId string) (*http.Request, error)
NewAddGroupMembershipRequest generates requests for AddGroupMembership
func NewAttachPolicyToGroupRequest ¶ added in v1.77.0
func NewAttachPolicyToGroupRequest(server string, groupId string, policyId string) (*http.Request, error)
NewAttachPolicyToGroupRequest generates requests for AttachPolicyToGroup
func NewAttachPolicyToUserRequest ¶ added in v1.77.0
func NewAttachPolicyToUserRequest(server string, userId string, policyId string) (*http.Request, error)
NewAttachPolicyToUserRequest generates requests for AttachPolicyToUser
func NewClaimTokenIdRequest ¶ added in v1.77.0
func NewClaimTokenIdRequest(server string, body ClaimTokenIdJSONRequestBody) (*http.Request, error)
NewClaimTokenIdRequest calls the generic ClaimTokenId builder with application/json body
func NewClaimTokenIdRequestWithBody ¶ added in v1.77.0
func NewClaimTokenIdRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewClaimTokenIdRequestWithBody generates requests for ClaimTokenId with any type of body
func NewCreateCredentialsRequest ¶ added in v1.77.0
func NewCreateCredentialsRequest(server string, userId string, params *CreateCredentialsParams) (*http.Request, error)
NewCreateCredentialsRequest generates requests for CreateCredentials
func NewCreateGroupRequest ¶ added in v1.77.0
func NewCreateGroupRequest(server string, body CreateGroupJSONRequestBody) (*http.Request, error)
NewCreateGroupRequest calls the generic CreateGroup builder with application/json body
func NewCreateGroupRequestWithBody ¶ added in v1.77.0
func NewCreateGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateGroupRequestWithBody generates requests for CreateGroup with any type of body
func NewCreatePolicyRequest ¶ added in v1.77.0
func NewCreatePolicyRequest(server string, body CreatePolicyJSONRequestBody) (*http.Request, error)
NewCreatePolicyRequest calls the generic CreatePolicy builder with application/json body
func NewCreatePolicyRequestWithBody ¶ added in v1.77.0
func NewCreatePolicyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreatePolicyRequestWithBody generates requests for CreatePolicy with any type of body
func NewCreateUserExternalPrincipalRequest ¶ added in v1.77.0
func NewCreateUserExternalPrincipalRequest(server string, userId string, params *CreateUserExternalPrincipalParams) (*http.Request, error)
NewCreateUserExternalPrincipalRequest generates requests for CreateUserExternalPrincipal
func NewCreateUserRequest ¶ added in v1.77.0
func NewCreateUserRequest(server string, body CreateUserJSONRequestBody) (*http.Request, error)
NewCreateUserRequest calls the generic CreateUser builder with application/json body
func NewCreateUserRequestWithBody ¶ added in v1.77.0
func NewCreateUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateUserRequestWithBody generates requests for CreateUser with any type of body
func NewDeleteCredentialsRequest ¶ added in v1.77.0
func NewDeleteCredentialsRequest(server string, userId string, accessKeyId string) (*http.Request, error)
NewDeleteCredentialsRequest generates requests for DeleteCredentials
func NewDeleteGroupMembershipRequest ¶ added in v1.77.0
func NewDeleteGroupMembershipRequest(server string, groupId string, userId string) (*http.Request, error)
NewDeleteGroupMembershipRequest generates requests for DeleteGroupMembership
func NewDeleteGroupRequest ¶ added in v1.77.0
NewDeleteGroupRequest generates requests for DeleteGroup
func NewDeletePolicyRequest ¶ added in v1.77.0
NewDeletePolicyRequest generates requests for DeletePolicy
func NewDeleteUserExternalPrincipalRequest ¶ added in v1.77.0
func NewDeleteUserExternalPrincipalRequest(server string, userId string, params *DeleteUserExternalPrincipalParams) (*http.Request, error)
NewDeleteUserExternalPrincipalRequest generates requests for DeleteUserExternalPrincipal
func NewDeleteUserRequest ¶ added in v1.77.0
NewDeleteUserRequest generates requests for DeleteUser
func NewDetachPolicyFromGroupRequest ¶ added in v1.77.0
func NewDetachPolicyFromGroupRequest(server string, groupId string, policyId string) (*http.Request, error)
NewDetachPolicyFromGroupRequest generates requests for DetachPolicyFromGroup
func NewDetachPolicyFromUserRequest ¶ added in v1.77.0
func NewDetachPolicyFromUserRequest(server string, userId string, policyId string) (*http.Request, error)
NewDetachPolicyFromUserRequest generates requests for DetachPolicyFromUser
func NewGetCredentialsForUserRequest ¶ added in v1.77.0
func NewGetCredentialsForUserRequest(server string, userId string, accessKeyId string) (*http.Request, error)
NewGetCredentialsForUserRequest generates requests for GetCredentialsForUser
func NewGetCredentialsRequest ¶ added in v1.77.0
NewGetCredentialsRequest generates requests for GetCredentials
func NewGetExternalPrincipalRequest ¶ added in v1.77.0
func NewGetExternalPrincipalRequest(server string, params *GetExternalPrincipalParams) (*http.Request, error)
NewGetExternalPrincipalRequest generates requests for GetExternalPrincipal
func NewGetGroupRequest ¶ added in v1.77.0
NewGetGroupRequest generates requests for GetGroup
func NewGetPolicyRequest ¶ added in v1.77.0
NewGetPolicyRequest generates requests for GetPolicy
func NewGetUserRequest ¶ added in v1.77.0
NewGetUserRequest generates requests for GetUser
func NewGetVersionRequest ¶ added in v1.77.0
NewGetVersionRequest generates requests for GetVersion
func NewHealthCheckRequest ¶ added in v1.77.0
NewHealthCheckRequest generates requests for HealthCheck
func NewListGroupMembersRequest ¶ added in v1.77.0
func NewListGroupMembersRequest(server string, groupId string, params *ListGroupMembersParams) (*http.Request, error)
NewListGroupMembersRequest generates requests for ListGroupMembers
func NewListGroupPoliciesRequest ¶ added in v1.77.0
func NewListGroupPoliciesRequest(server string, groupId string, params *ListGroupPoliciesParams) (*http.Request, error)
NewListGroupPoliciesRequest generates requests for ListGroupPolicies
func NewListGroupsRequest ¶ added in v1.77.0
func NewListGroupsRequest(server string, params *ListGroupsParams) (*http.Request, error)
NewListGroupsRequest generates requests for ListGroups
func NewListPoliciesRequest ¶ added in v1.77.0
func NewListPoliciesRequest(server string, params *ListPoliciesParams) (*http.Request, error)
NewListPoliciesRequest generates requests for ListPolicies
func NewListUserCredentialsRequest ¶ added in v1.77.0
func NewListUserCredentialsRequest(server string, userId string, params *ListUserCredentialsParams) (*http.Request, error)
NewListUserCredentialsRequest generates requests for ListUserCredentials
func NewListUserExternalPrincipalsRequest ¶ added in v1.77.0
func NewListUserExternalPrincipalsRequest(server string, userId string, params *ListUserExternalPrincipalsParams) (*http.Request, error)
NewListUserExternalPrincipalsRequest generates requests for ListUserExternalPrincipals
func NewListUserGroupsRequest ¶ added in v1.77.0
func NewListUserGroupsRequest(server string, userId string, params *ListUserGroupsParams) (*http.Request, error)
NewListUserGroupsRequest generates requests for ListUserGroups
func NewListUserPoliciesRequest ¶ added in v1.77.0
func NewListUserPoliciesRequest(server string, userId string, params *ListUserPoliciesParams) (*http.Request, error)
NewListUserPoliciesRequest generates requests for ListUserPolicies
func NewListUsersRequest ¶ added in v1.77.0
func NewListUsersRequest(server string, params *ListUsersParams) (*http.Request, error)
NewListUsersRequest generates requests for ListUsers
func NewUpdatePasswordRequest ¶ added in v1.77.0
func NewUpdatePasswordRequest(server string, userId string, body UpdatePasswordJSONRequestBody) (*http.Request, error)
NewUpdatePasswordRequest calls the generic UpdatePassword builder with application/json body
func NewUpdatePasswordRequestWithBody ¶ added in v1.77.0
func NewUpdatePasswordRequestWithBody(server string, userId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdatePasswordRequestWithBody generates requests for UpdatePassword with any type of body
func NewUpdatePolicyRequest ¶ added in v1.77.0
func NewUpdatePolicyRequest(server string, policyId string, body UpdatePolicyJSONRequestBody) (*http.Request, error)
NewUpdatePolicyRequest calls the generic UpdatePolicy builder with application/json body
func NewUpdatePolicyRequestWithBody ¶ added in v1.77.0
func NewUpdatePolicyRequestWithBody(server string, policyId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdatePolicyRequestWithBody generates requests for UpdatePolicy with any type of body
func NewUpdateUserFriendlyNameRequest ¶ added in v1.77.0
func NewUpdateUserFriendlyNameRequest(server string, userId string, body UpdateUserFriendlyNameJSONRequestBody) (*http.Request, error)
NewUpdateUserFriendlyNameRequest calls the generic UpdateUserFriendlyName builder with application/json body
func NewUpdateUserFriendlyNameRequestWithBody ¶ added in v1.77.0
func NewUpdateUserFriendlyNameRequestWithBody(server string, userId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateUserFriendlyNameRequestWithBody generates requests for UpdateUserFriendlyName with any type of body
func ObserveDuration ¶ added in v1.28.0
func ParsePolicyResourceAsList ¶ added in v1.54.0
func UserByAuth ¶ added in v1.77.1
func UserByToken ¶ added in v1.77.1
Types ¶
type APIAuthService ¶ added in v0.63.0
type APIAuthService struct {
// contains filtered or unexported fields
}
func NewAPIAuthService ¶ added in v0.63.0
func NewAPIAuthService(apiEndpoint, token string, isAdvancedAuth, externalPrincipalsEnabled bool, secretStore crypt.SecretStore, cacheConf params.ServiceCache, logger logging.Logger) (*APIAuthService, error)
func NewAPIAuthServiceWithClient ¶ added in v0.70.0
func NewAPIAuthServiceWithClient(client ClientWithResponsesInterface, isAdvancedAuth, externalPrincipalsEnabled bool, secretStore crypt.SecretStore, cacheConf params.ServiceCache, logger logging.Logger) (*APIAuthService, error)
func (*APIAuthService) AddCredentials ¶ added in v0.63.0
func (a *APIAuthService) AddCredentials(ctx context.Context, username, accessKeyID, secretAccessKey string) (*model.Credential, error)
func (*APIAuthService) AddUserToGroup ¶ added in v0.63.0
func (a *APIAuthService) AddUserToGroup(ctx context.Context, username, groupID string) error
func (*APIAuthService) AttachPolicyToGroup ¶ added in v0.63.0
func (a *APIAuthService) AttachPolicyToGroup(ctx context.Context, policyDisplayName, groupID string) error
func (*APIAuthService) AttachPolicyToUser ¶ added in v0.63.0
func (a *APIAuthService) AttachPolicyToUser(ctx context.Context, policyDisplayName, username string) error
func (*APIAuthService) Authorize ¶ added in v0.63.0
func (a *APIAuthService) Authorize(ctx context.Context, req *AuthorizationRequest) (*AuthorizationResponse, error)
func (*APIAuthService) Cache ¶ added in v0.68.0
func (a *APIAuthService) Cache() Cache
func (*APIAuthService) CheckHealth ¶ added in v1.1.0
func (*APIAuthService) ClaimTokenIDOnce ¶ added in v0.64.0
func (*APIAuthService) CreateCredentials ¶ added in v0.63.0
func (a *APIAuthService) CreateCredentials(ctx context.Context, username string) (*model.Credential, error)
func (*APIAuthService) CreateGroup ¶ added in v0.63.0
func (*APIAuthService) CreateUser ¶ added in v0.63.0
func (*APIAuthService) CreateUserExternalPrincipal ¶ added in v1.14.0
func (a *APIAuthService) CreateUserExternalPrincipal(ctx context.Context, userID, principalID string) error
func (*APIAuthService) DeleteCredentials ¶ added in v0.63.0
func (a *APIAuthService) DeleteCredentials(ctx context.Context, username, accessKeyID string) error
func (*APIAuthService) DeleteGroup ¶ added in v0.63.0
func (a *APIAuthService) DeleteGroup(ctx context.Context, groupID string) error
func (*APIAuthService) DeletePolicy ¶ added in v0.63.0
func (a *APIAuthService) DeletePolicy(ctx context.Context, policyDisplayName string) error
func (*APIAuthService) DeleteUser ¶ added in v0.63.0
func (a *APIAuthService) DeleteUser(ctx context.Context, username string) error
func (*APIAuthService) DeleteUserExternalPrincipal ¶ added in v1.14.0
func (a *APIAuthService) DeleteUserExternalPrincipal(ctx context.Context, userID, principalID string) error
func (*APIAuthService) DetachPolicyFromGroup ¶ added in v0.63.0
func (a *APIAuthService) DetachPolicyFromGroup(ctx context.Context, policyDisplayName, groupID string) error
func (*APIAuthService) DetachPolicyFromUser ¶ added in v0.63.0
func (a *APIAuthService) DetachPolicyFromUser(ctx context.Context, policyDisplayName, username string) error
func (*APIAuthService) GetCredentials ¶ added in v0.63.0
func (a *APIAuthService) GetCredentials(ctx context.Context, accessKeyID string) (*model.Credential, error)
func (*APIAuthService) GetCredentialsForUser ¶ added in v0.63.0
func (a *APIAuthService) GetCredentialsForUser(ctx context.Context, username, accessKeyID string) (*model.Credential, error)
func (*APIAuthService) GetExternalPrincipal ¶ added in v1.14.1
func (a *APIAuthService) GetExternalPrincipal(ctx context.Context, principalID string) (*model.ExternalPrincipal, error)
func (*APIAuthService) GetUserByEmail ¶ added in v0.63.0
func (*APIAuthService) GetUserByExternalID ¶ added in v0.69.0
func (*APIAuthService) GetUserByID ¶ added in v0.63.0
func (*APIAuthService) InviteUser ¶ added in v0.69.0
func (a *APIAuthService) InviteUser(ctx context.Context, email string) error
func (*APIAuthService) IsAdvancedAuth ¶ added in v1.53.0
func (a *APIAuthService) IsAdvancedAuth() bool
func (*APIAuthService) IsExternalPrincipalsEnabled ¶ added in v1.14.0
func (a *APIAuthService) IsExternalPrincipalsEnabled(_ context.Context) bool
func (*APIAuthService) ListEffectivePolicies ¶ added in v0.63.0
func (*APIAuthService) ListGroupPolicies ¶ added in v0.63.0
func (*APIAuthService) ListGroupUsers ¶ added in v0.63.0
func (*APIAuthService) ListGroups ¶ added in v0.63.0
func (a *APIAuthService) ListGroups(ctx context.Context, params *model.PaginationParams) ([]*model.Group, *model.Paginator, error)
func (*APIAuthService) ListPolicies ¶ added in v0.63.0
func (a *APIAuthService) ListPolicies(ctx context.Context, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
func (*APIAuthService) ListUserCredentials ¶ added in v0.63.0
func (a *APIAuthService) ListUserCredentials(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Credential, *model.Paginator, error)
func (*APIAuthService) ListUserExternalPrincipals ¶ added in v1.14.0
func (a *APIAuthService) ListUserExternalPrincipals(ctx context.Context, userID string, params *model.PaginationParams) ([]*model.ExternalPrincipal, *model.Paginator, error)
func (*APIAuthService) ListUserGroups ¶ added in v0.63.0
func (*APIAuthService) ListUserPolicies ¶ added in v0.63.0
func (*APIAuthService) ListUsers ¶ added in v0.63.0
func (a *APIAuthService) ListUsers(ctx context.Context, params *model.PaginationParams) ([]*model.User, *model.Paginator, error)
func (*APIAuthService) RemoveUserFromGroup ¶ added in v0.63.0
func (a *APIAuthService) RemoveUserFromGroup(ctx context.Context, username, groupID string) error
func (*APIAuthService) SecretStore ¶ added in v0.63.0
func (a *APIAuthService) SecretStore() crypt.SecretStore
func (*APIAuthService) UpdateUserFriendlyName ¶ added in v1.16.0
func (*APIAuthService) WritePolicy ¶ added in v0.63.0
type AddGroupMembershipResponse ¶ added in v1.77.0
type AddGroupMembershipResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseAddGroupMembershipResponse ¶ added in v1.77.0
func ParseAddGroupMembershipResponse(rsp *http.Response) (*AddGroupMembershipResponse, error)
ParseAddGroupMembershipResponse parses an HTTP response from a AddGroupMembershipWithResponse call
func (AddGroupMembershipResponse) Status ¶ added in v1.77.0
func (r AddGroupMembershipResponse) Status() string
Status returns HTTPResponse.Status
func (AddGroupMembershipResponse) StatusCode ¶ added in v1.77.0
func (r AddGroupMembershipResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Arn ¶
type AttachPolicyToGroupResponse ¶ added in v1.77.0
type AttachPolicyToGroupResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseAttachPolicyToGroupResponse ¶ added in v1.77.0
func ParseAttachPolicyToGroupResponse(rsp *http.Response) (*AttachPolicyToGroupResponse, error)
ParseAttachPolicyToGroupResponse parses an HTTP response from a AttachPolicyToGroupWithResponse call
func (AttachPolicyToGroupResponse) Status ¶ added in v1.77.0
func (r AttachPolicyToGroupResponse) Status() string
Status returns HTTPResponse.Status
func (AttachPolicyToGroupResponse) StatusCode ¶ added in v1.77.0
func (r AttachPolicyToGroupResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AttachPolicyToUserResponse ¶ added in v1.77.0
type AttachPolicyToUserResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseAttachPolicyToUserResponse ¶ added in v1.77.0
func ParseAttachPolicyToUserResponse(rsp *http.Response) (*AttachPolicyToUserResponse, error)
ParseAttachPolicyToUserResponse parses an HTTP response from a AttachPolicyToUserWithResponse call
func (AttachPolicyToUserResponse) Status ¶ added in v1.77.0
func (r AttachPolicyToUserResponse) Status() string
Status returns HTTPResponse.Status
func (AttachPolicyToUserResponse) StatusCode ¶ added in v1.77.0
func (r AttachPolicyToUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Authenticator ¶ added in v0.53.0
type Authenticator interface {
// AuthenticateUser authenticates a user matching username and
// password and returns their ID.
AuthenticateUser(ctx context.Context, username, password string) (string, error)
}
Authenticator authenticates users returning an identifier for the user. (Currently it handles only username+password single-step authentication. This interface will need to change significantly in order to support challenge-response protocols.)
type AuthorizationRequest ¶
type AuthorizationRequest struct {
Username string
RequiredPermissions permissions.Node
ClientIP string // IP address of the client making the request
}
type AuthorizationResponse ¶
type Authorizer ¶ added in v0.69.0
type Authorizer interface {
// Authorize checks 'req' containing user and required permissions. An error returns in case we fail perform the request.
// AuthorizationResponse holds if the request allowed and Error in case we fail with additional reason as ErrInsufficientPermissions.
Authorize(ctx context.Context, req *AuthorizationRequest) (*AuthorizationResponse, error)
}
type BasicAuthService ¶ added in v1.32.0
type BasicAuthService struct {
// contains filtered or unexported fields
}
func NewBasicAuthService ¶ added in v1.32.0
func NewBasicAuthService(store kv.Store, secretStore crypt.SecretStore, cacheConf params.ServiceCache, logger logging.Logger) *BasicAuthService
func (*BasicAuthService) AddCredentials ¶ added in v1.32.0
func (s *BasicAuthService) AddCredentials(ctx context.Context, username, accessKeyID, secretAccessKey string) (*model.Credential, error)
func (*BasicAuthService) AddUserToGroup ¶ added in v1.32.0
func (s *BasicAuthService) AddUserToGroup(_ context.Context, _, _ string) error
func (*BasicAuthService) AttachPolicyToGroup ¶ added in v1.32.0
func (s *BasicAuthService) AttachPolicyToGroup(_ context.Context, _, _ string) error
func (*BasicAuthService) AttachPolicyToUser ¶ added in v1.32.0
func (s *BasicAuthService) AttachPolicyToUser(_ context.Context, _, _ string) error
func (*BasicAuthService) Authorize ¶ added in v1.32.0
func (s *BasicAuthService) Authorize(ctx context.Context, req *AuthorizationRequest) (*AuthorizationResponse, error)
func (*BasicAuthService) Cache ¶ added in v1.32.0
func (s *BasicAuthService) Cache() Cache
func (*BasicAuthService) ClaimTokenIDOnce ¶ added in v1.32.0
func (*BasicAuthService) CreateCredentials ¶ added in v1.32.0
func (s *BasicAuthService) CreateCredentials(ctx context.Context, username string) (*model.Credential, error)
func (*BasicAuthService) CreateGroup ¶ added in v1.32.0
func (*BasicAuthService) CreateUser ¶ added in v1.32.0
func (*BasicAuthService) CreateUserExternalPrincipal ¶ added in v1.32.0
func (s *BasicAuthService) CreateUserExternalPrincipal(_ context.Context, _, _ string) error
func (*BasicAuthService) DeleteCredentials ¶ added in v1.32.0
func (s *BasicAuthService) DeleteCredentials(_ context.Context, _, _ string) error
func (*BasicAuthService) DeleteGroup ¶ added in v1.32.0
func (s *BasicAuthService) DeleteGroup(_ context.Context, _ string) error
func (*BasicAuthService) DeletePolicy ¶ added in v1.32.0
func (s *BasicAuthService) DeletePolicy(_ context.Context, _ string) error
func (*BasicAuthService) DeleteUser ¶ added in v1.32.0
func (s *BasicAuthService) DeleteUser(ctx context.Context, username string) error
func (*BasicAuthService) DeleteUserExternalPrincipal ¶ added in v1.32.0
func (s *BasicAuthService) DeleteUserExternalPrincipal(_ context.Context, _, _ string) error
func (*BasicAuthService) DetachPolicyFromGroup ¶ added in v1.32.0
func (s *BasicAuthService) DetachPolicyFromGroup(_ context.Context, _, _ string) error
func (*BasicAuthService) DetachPolicyFromUser ¶ added in v1.32.0
func (s *BasicAuthService) DetachPolicyFromUser(_ context.Context, _, _ string) error
func (*BasicAuthService) GetCredentials ¶ added in v1.32.0
func (s *BasicAuthService) GetCredentials(ctx context.Context, accessKeyID string) (*model.Credential, error)
func (*BasicAuthService) GetCredentialsForUser ¶ added in v1.32.0
func (s *BasicAuthService) GetCredentialsForUser(ctx context.Context, username, accessKeyID string) (*model.Credential, error)
func (*BasicAuthService) GetExternalPrincipal ¶ added in v1.32.0
func (s *BasicAuthService) GetExternalPrincipal(_ context.Context, _ string) (*model.ExternalPrincipal, error)
func (*BasicAuthService) GetUserByEmail ¶ added in v1.32.0
func (*BasicAuthService) GetUserByExternalID ¶ added in v1.32.0
func (*BasicAuthService) GetUserByID ¶ added in v1.32.0
func (*BasicAuthService) IsAdvancedAuth ¶ added in v1.53.0
func (s *BasicAuthService) IsAdvancedAuth() bool
func (*BasicAuthService) IsExternalPrincipalsEnabled ¶ added in v1.32.0
func (s *BasicAuthService) IsExternalPrincipalsEnabled(_ context.Context) bool
func (*BasicAuthService) ListEffectivePolicies ¶ added in v1.32.0
func (*BasicAuthService) ListGroupPolicies ¶ added in v1.32.0
func (*BasicAuthService) ListGroupUsers ¶ added in v1.32.0
func (*BasicAuthService) ListGroups ¶ added in v1.32.0
func (s *BasicAuthService) ListGroups(_ context.Context, _ *model.PaginationParams) ([]*model.Group, *model.Paginator, error)
func (*BasicAuthService) ListPolicies ¶ added in v1.32.0
func (s *BasicAuthService) ListPolicies(_ context.Context, _ *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
func (*BasicAuthService) ListUserCredentials ¶ added in v1.32.0
func (s *BasicAuthService) ListUserCredentials(_ context.Context, _ string, _ *model.PaginationParams) ([]*model.Credential, *model.Paginator, error)
func (*BasicAuthService) ListUserExternalPrincipals ¶ added in v1.32.0
func (s *BasicAuthService) ListUserExternalPrincipals(_ context.Context, _ string, _ *model.PaginationParams) ([]*model.ExternalPrincipal, *model.Paginator, error)
func (*BasicAuthService) ListUserGroups ¶ added in v1.32.0
func (*BasicAuthService) ListUserPolicies ¶ added in v1.32.0
func (*BasicAuthService) ListUsers ¶ added in v1.32.0
func (s *BasicAuthService) ListUsers(ctx context.Context, _ *model.PaginationParams) ([]*model.User, *model.Paginator, error)
func (*BasicAuthService) Migrate ¶ added in v1.33.0
func (s *BasicAuthService) Migrate(ctx context.Context) (string, error)
Migrate tries to perform migration of existing lakeFS server to basic auth
func (*BasicAuthService) RemoveUserFromGroup ¶ added in v1.32.0
func (s *BasicAuthService) RemoveUserFromGroup(_ context.Context, _, _ string) error
func (*BasicAuthService) SecretStore ¶ added in v1.32.0
func (s *BasicAuthService) SecretStore() crypt.SecretStore
func (*BasicAuthService) UpdateUserFriendlyName ¶ added in v1.32.0
func (*BasicAuthService) WritePolicy ¶ added in v1.32.0
type BuiltinAuthenticator ¶ added in v0.53.0
type BuiltinAuthenticator struct {
// contains filtered or unexported fields
}
BuiltinAuthenticator authenticates users by their access key IDs and passwords stored in the auth service.
func NewBuiltinAuthenticator ¶ added in v0.53.0
func NewBuiltinAuthenticator(service Service) *BuiltinAuthenticator
func (*BuiltinAuthenticator) AuthenticateUser ¶ added in v0.53.0
func (*BuiltinAuthenticator) String ¶ added in v0.62.0
func (ba *BuiltinAuthenticator) String() string
type Cache ¶
type Cache interface {
GetCredential(accessKeyID string, setFn CredentialSetFn) (*model.Credential, error)
GetUser(key UserKey, setFn UserSetFn) (*model.User, error)
GetUserPolicies(userID string, setFn UserPoliciesSetFn) ([]*model.Policy, error)
GetExternalPrincipal(key string, setFn ExternalPrincipalFn) (*model.ExternalPrincipal, error)
}
type ChainAuthenticator ¶ added in v0.53.0
type ChainAuthenticator []Authenticator
ChainAuthenticator authenticates users by trying each Authenticator in order, returning the last error in case all fail.
func (ChainAuthenticator) AuthenticateUser ¶ added in v0.53.0
type CheckResult ¶ added in v0.53.1
type CheckResult int
CheckResult - the final result for the authorization is accepted only if it's CheckAllow
func CheckPermissions ¶ added in v1.32.0
func CheckPermissions(ctx context.Context, node permissions.Node, username string, policies []*model.Policy, permAudit *MissingPermissions) CheckResult
type ClaimTokenId ¶ added in v1.77.0
type ClaimTokenId struct {
// Unix Epoch in seconds
ExpiresAt int64 `json:"expires_at"`
TokenId string `json:"token_id"`
}
ClaimTokenId defines model for ClaimTokenId.
type ClaimTokenIdJSONBody ¶ added in v1.77.0
type ClaimTokenIdJSONBody ClaimTokenId
ClaimTokenIdJSONBody defines parameters for ClaimTokenId.
type ClaimTokenIdJSONRequestBody ¶ added in v1.77.0
type ClaimTokenIdJSONRequestBody ClaimTokenIdJSONBody
ClaimTokenIdJSONRequestBody defines body for ClaimTokenId for application/json ContentType.
type ClaimTokenIdResponse ¶ added in v1.77.0
type ClaimTokenIdResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *Error
JSON401 *Error
JSONDefault *Error
}
func ParseClaimTokenIdResponse ¶ added in v1.77.0
func ParseClaimTokenIdResponse(rsp *http.Response) (*ClaimTokenIdResponse, error)
ParseClaimTokenIdResponse parses an HTTP response from a ClaimTokenIdWithResponse call
func (ClaimTokenIdResponse) Status ¶ added in v1.77.0
func (r ClaimTokenIdResponse) Status() string
Status returns HTTPResponse.Status
func (ClaimTokenIdResponse) StatusCode ¶ added in v1.77.0
func (r ClaimTokenIdResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Client ¶ added in v1.77.0
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶ added in v1.77.0
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) AddGroupMembership ¶ added in v1.77.0
func (*Client) AttachPolicyToGroup ¶ added in v1.77.0
func (*Client) AttachPolicyToUser ¶ added in v1.77.0
func (*Client) ClaimTokenId ¶ added in v1.77.0
func (c *Client) ClaimTokenId(ctx context.Context, body ClaimTokenIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ClaimTokenIdWithBody ¶ added in v1.77.0
func (*Client) CreateCredentials ¶ added in v1.77.0
func (c *Client) CreateCredentials(ctx context.Context, userId string, params *CreateCredentialsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateGroup ¶ added in v1.77.0
func (c *Client) CreateGroup(ctx context.Context, body CreateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateGroupWithBody ¶ added in v1.77.0
func (*Client) CreatePolicy ¶ added in v1.77.0
func (c *Client) CreatePolicy(ctx context.Context, body CreatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreatePolicyWithBody ¶ added in v1.77.0
func (*Client) CreateUser ¶ added in v1.77.0
func (c *Client) CreateUser(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateUserExternalPrincipal ¶ added in v1.77.0
func (c *Client) CreateUserExternalPrincipal(ctx context.Context, userId string, params *CreateUserExternalPrincipalParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateUserWithBody ¶ added in v1.77.0
func (*Client) DeleteCredentials ¶ added in v1.77.0
func (*Client) DeleteGroup ¶ added in v1.77.0
func (*Client) DeleteGroupMembership ¶ added in v1.77.0
func (*Client) DeletePolicy ¶ added in v1.77.0
func (*Client) DeleteUser ¶ added in v1.77.0
func (*Client) DeleteUserExternalPrincipal ¶ added in v1.77.0
func (c *Client) DeleteUserExternalPrincipal(ctx context.Context, userId string, params *DeleteUserExternalPrincipalParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) DetachPolicyFromGroup ¶ added in v1.77.0
func (*Client) DetachPolicyFromUser ¶ added in v1.77.0
func (*Client) GetCredentials ¶ added in v1.77.0
func (*Client) GetCredentialsForUser ¶ added in v1.77.0
func (*Client) GetExternalPrincipal ¶ added in v1.77.0
func (c *Client) GetExternalPrincipal(ctx context.Context, params *GetExternalPrincipalParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetVersion ¶ added in v1.77.0
func (*Client) HealthCheck ¶ added in v1.77.0
func (*Client) ListGroupMembers ¶ added in v1.77.0
func (c *Client) ListGroupMembers(ctx context.Context, groupId string, params *ListGroupMembersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListGroupPolicies ¶ added in v1.77.0
func (c *Client) ListGroupPolicies(ctx context.Context, groupId string, params *ListGroupPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListGroups ¶ added in v1.77.0
func (c *Client) ListGroups(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListPolicies ¶ added in v1.77.0
func (c *Client) ListPolicies(ctx context.Context, params *ListPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListUserCredentials ¶ added in v1.77.0
func (c *Client) ListUserCredentials(ctx context.Context, userId string, params *ListUserCredentialsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListUserExternalPrincipals ¶ added in v1.77.0
func (c *Client) ListUserExternalPrincipals(ctx context.Context, userId string, params *ListUserExternalPrincipalsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListUserGroups ¶ added in v1.77.0
func (c *Client) ListUserGroups(ctx context.Context, userId string, params *ListUserGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListUserPolicies ¶ added in v1.77.0
func (c *Client) ListUserPolicies(ctx context.Context, userId string, params *ListUserPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListUsers ¶ added in v1.77.0
func (c *Client) ListUsers(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdatePassword ¶ added in v1.77.0
func (c *Client) UpdatePassword(ctx context.Context, userId string, body UpdatePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdatePasswordWithBody ¶ added in v1.77.0
func (*Client) UpdatePolicy ¶ added in v1.77.0
func (c *Client) UpdatePolicy(ctx context.Context, policyId string, body UpdatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdatePolicyWithBody ¶ added in v1.77.0
func (*Client) UpdateUserFriendlyName ¶ added in v1.77.0
func (c *Client) UpdateUserFriendlyName(ctx context.Context, userId string, body UpdateUserFriendlyNameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶ added in v1.77.0
type ClientInterface interface {
// GetCredentials request
GetCredentials(ctx context.Context, accessKeyId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetExternalPrincipal request
GetExternalPrincipal(ctx context.Context, params *GetExternalPrincipalParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListGroups request
ListGroups(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateGroup request with any body
CreateGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateGroup(ctx context.Context, body CreateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteGroup request
DeleteGroup(ctx context.Context, groupId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetGroup request
GetGroup(ctx context.Context, groupId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListGroupMembers request
ListGroupMembers(ctx context.Context, groupId string, params *ListGroupMembersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteGroupMembership request
DeleteGroupMembership(ctx context.Context, groupId string, userId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// AddGroupMembership request
AddGroupMembership(ctx context.Context, groupId string, userId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListGroupPolicies request
ListGroupPolicies(ctx context.Context, groupId string, params *ListGroupPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// DetachPolicyFromGroup request
DetachPolicyFromGroup(ctx context.Context, groupId string, policyId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// AttachPolicyToGroup request
AttachPolicyToGroup(ctx context.Context, groupId string, policyId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListPolicies request
ListPolicies(ctx context.Context, params *ListPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreatePolicy request with any body
CreatePolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreatePolicy(ctx context.Context, body CreatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeletePolicy request
DeletePolicy(ctx context.Context, policyId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetPolicy request
GetPolicy(ctx context.Context, policyId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdatePolicy request with any body
UpdatePolicyWithBody(ctx context.Context, policyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdatePolicy(ctx context.Context, policyId string, body UpdatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ClaimTokenId request with any body
ClaimTokenIdWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ClaimTokenId(ctx context.Context, body ClaimTokenIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListUsers request
ListUsers(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateUser request with any body
CreateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateUser(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteUser request
DeleteUser(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetUser request
GetUser(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListUserCredentials request
ListUserCredentials(ctx context.Context, userId string, params *ListUserCredentialsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateCredentials request
CreateCredentials(ctx context.Context, userId string, params *CreateCredentialsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteCredentials request
DeleteCredentials(ctx context.Context, userId string, accessKeyId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetCredentialsForUser request
GetCredentialsForUser(ctx context.Context, userId string, accessKeyId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteUserExternalPrincipal request
DeleteUserExternalPrincipal(ctx context.Context, userId string, params *DeleteUserExternalPrincipalParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateUserExternalPrincipal request
CreateUserExternalPrincipal(ctx context.Context, userId string, params *CreateUserExternalPrincipalParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListUserExternalPrincipals request
ListUserExternalPrincipals(ctx context.Context, userId string, params *ListUserExternalPrincipalsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateUserFriendlyName request with any body
UpdateUserFriendlyNameWithBody(ctx context.Context, userId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateUserFriendlyName(ctx context.Context, userId string, body UpdateUserFriendlyNameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListUserGroups request
ListUserGroups(ctx context.Context, userId string, params *ListUserGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdatePassword request with any body
UpdatePasswordWithBody(ctx context.Context, userId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdatePassword(ctx context.Context, userId string, body UpdatePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListUserPolicies request
ListUserPolicies(ctx context.Context, userId string, params *ListUserPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// DetachPolicyFromUser request
DetachPolicyFromUser(ctx context.Context, userId string, policyId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// AttachPolicyToUser request
AttachPolicyToUser(ctx context.Context, userId string, policyId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetVersion request
GetVersion(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// HealthCheck request
HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶ added in v1.77.0
ClientOption allows setting custom parameters during construction
func WithBaseURL ¶ added in v1.77.0
func WithBaseURL(baseURL string) ClientOption
WithBaseURL overrides the baseURL.
func WithHTTPClient ¶ added in v1.77.0
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶ added in v1.77.0
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶ added in v1.77.0
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶ added in v1.77.0
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) AddGroupMembershipWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) AddGroupMembershipWithResponse(ctx context.Context, groupId string, userId string, reqEditors ...RequestEditorFn) (*AddGroupMembershipResponse, error)
AddGroupMembershipWithResponse request returning *AddGroupMembershipResponse
func (*ClientWithResponses) AttachPolicyToGroupWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) AttachPolicyToGroupWithResponse(ctx context.Context, groupId string, policyId string, reqEditors ...RequestEditorFn) (*AttachPolicyToGroupResponse, error)
AttachPolicyToGroupWithResponse request returning *AttachPolicyToGroupResponse
func (*ClientWithResponses) AttachPolicyToUserWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) AttachPolicyToUserWithResponse(ctx context.Context, userId string, policyId string, reqEditors ...RequestEditorFn) (*AttachPolicyToUserResponse, error)
AttachPolicyToUserWithResponse request returning *AttachPolicyToUserResponse
func (*ClientWithResponses) ClaimTokenIdWithBodyWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) ClaimTokenIdWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ClaimTokenIdResponse, error)
ClaimTokenIdWithBodyWithResponse request with arbitrary body returning *ClaimTokenIdResponse
func (*ClientWithResponses) ClaimTokenIdWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) ClaimTokenIdWithResponse(ctx context.Context, body ClaimTokenIdJSONRequestBody, reqEditors ...RequestEditorFn) (*ClaimTokenIdResponse, error)
func (*ClientWithResponses) CreateCredentialsWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) CreateCredentialsWithResponse(ctx context.Context, userId string, params *CreateCredentialsParams, reqEditors ...RequestEditorFn) (*CreateCredentialsResponse, error)
CreateCredentialsWithResponse request returning *CreateCredentialsResponse
func (*ClientWithResponses) CreateGroupWithBodyWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) CreateGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateGroupResponse, error)
CreateGroupWithBodyWithResponse request with arbitrary body returning *CreateGroupResponse
func (*ClientWithResponses) CreateGroupWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) CreateGroupWithResponse(ctx context.Context, body CreateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGroupResponse, error)
func (*ClientWithResponses) CreatePolicyWithBodyWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) CreatePolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePolicyResponse, error)
CreatePolicyWithBodyWithResponse request with arbitrary body returning *CreatePolicyResponse
func (*ClientWithResponses) CreatePolicyWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) CreatePolicyWithResponse(ctx context.Context, body CreatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePolicyResponse, error)
func (*ClientWithResponses) CreateUserExternalPrincipalWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) CreateUserExternalPrincipalWithResponse(ctx context.Context, userId string, params *CreateUserExternalPrincipalParams, reqEditors ...RequestEditorFn) (*CreateUserExternalPrincipalResponse, error)
CreateUserExternalPrincipalWithResponse request returning *CreateUserExternalPrincipalResponse
func (*ClientWithResponses) CreateUserWithBodyWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) CreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
CreateUserWithBodyWithResponse request with arbitrary body returning *CreateUserResponse
func (*ClientWithResponses) CreateUserWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) CreateUserWithResponse(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
func (*ClientWithResponses) DeleteCredentialsWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) DeleteCredentialsWithResponse(ctx context.Context, userId string, accessKeyId string, reqEditors ...RequestEditorFn) (*DeleteCredentialsResponse, error)
DeleteCredentialsWithResponse request returning *DeleteCredentialsResponse
func (*ClientWithResponses) DeleteGroupMembershipWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) DeleteGroupMembershipWithResponse(ctx context.Context, groupId string, userId string, reqEditors ...RequestEditorFn) (*DeleteGroupMembershipResponse, error)
DeleteGroupMembershipWithResponse request returning *DeleteGroupMembershipResponse
func (*ClientWithResponses) DeleteGroupWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) DeleteGroupWithResponse(ctx context.Context, groupId string, reqEditors ...RequestEditorFn) (*DeleteGroupResponse, error)
DeleteGroupWithResponse request returning *DeleteGroupResponse
func (*ClientWithResponses) DeletePolicyWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) DeletePolicyWithResponse(ctx context.Context, policyId string, reqEditors ...RequestEditorFn) (*DeletePolicyResponse, error)
DeletePolicyWithResponse request returning *DeletePolicyResponse
func (*ClientWithResponses) DeleteUserExternalPrincipalWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) DeleteUserExternalPrincipalWithResponse(ctx context.Context, userId string, params *DeleteUserExternalPrincipalParams, reqEditors ...RequestEditorFn) (*DeleteUserExternalPrincipalResponse, error)
DeleteUserExternalPrincipalWithResponse request returning *DeleteUserExternalPrincipalResponse
func (*ClientWithResponses) DeleteUserWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)
DeleteUserWithResponse request returning *DeleteUserResponse
func (*ClientWithResponses) DetachPolicyFromGroupWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) DetachPolicyFromGroupWithResponse(ctx context.Context, groupId string, policyId string, reqEditors ...RequestEditorFn) (*DetachPolicyFromGroupResponse, error)
DetachPolicyFromGroupWithResponse request returning *DetachPolicyFromGroupResponse
func (*ClientWithResponses) DetachPolicyFromUserWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) DetachPolicyFromUserWithResponse(ctx context.Context, userId string, policyId string, reqEditors ...RequestEditorFn) (*DetachPolicyFromUserResponse, error)
DetachPolicyFromUserWithResponse request returning *DetachPolicyFromUserResponse
func (*ClientWithResponses) GetCredentialsForUserWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) GetCredentialsForUserWithResponse(ctx context.Context, userId string, accessKeyId string, reqEditors ...RequestEditorFn) (*GetCredentialsForUserResponse, error)
GetCredentialsForUserWithResponse request returning *GetCredentialsForUserResponse
func (*ClientWithResponses) GetCredentialsWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) GetCredentialsWithResponse(ctx context.Context, accessKeyId string, reqEditors ...RequestEditorFn) (*GetCredentialsResponse, error)
GetCredentialsWithResponse request returning *GetCredentialsResponse
func (*ClientWithResponses) GetExternalPrincipalWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) GetExternalPrincipalWithResponse(ctx context.Context, params *GetExternalPrincipalParams, reqEditors ...RequestEditorFn) (*GetExternalPrincipalResponse, error)
GetExternalPrincipalWithResponse request returning *GetExternalPrincipalResponse
func (*ClientWithResponses) GetGroupWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) GetGroupWithResponse(ctx context.Context, groupId string, reqEditors ...RequestEditorFn) (*GetGroupResponse, error)
GetGroupWithResponse request returning *GetGroupResponse
func (*ClientWithResponses) GetPolicyWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) GetPolicyWithResponse(ctx context.Context, policyId string, reqEditors ...RequestEditorFn) (*GetPolicyResponse, error)
GetPolicyWithResponse request returning *GetPolicyResponse
func (*ClientWithResponses) GetUserWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) GetUserWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*GetUserResponse, error)
GetUserWithResponse request returning *GetUserResponse
func (*ClientWithResponses) GetVersionWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResponse, error)
GetVersionWithResponse request returning *GetVersionResponse
func (*ClientWithResponses) HealthCheckWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error)
HealthCheckWithResponse request returning *HealthCheckResponse
func (*ClientWithResponses) ListGroupMembersWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) ListGroupMembersWithResponse(ctx context.Context, groupId string, params *ListGroupMembersParams, reqEditors ...RequestEditorFn) (*ListGroupMembersResponse, error)
ListGroupMembersWithResponse request returning *ListGroupMembersResponse
func (*ClientWithResponses) ListGroupPoliciesWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) ListGroupPoliciesWithResponse(ctx context.Context, groupId string, params *ListGroupPoliciesParams, reqEditors ...RequestEditorFn) (*ListGroupPoliciesResponse, error)
ListGroupPoliciesWithResponse request returning *ListGroupPoliciesResponse
func (*ClientWithResponses) ListGroupsWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) ListGroupsWithResponse(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*ListGroupsResponse, error)
ListGroupsWithResponse request returning *ListGroupsResponse
func (*ClientWithResponses) ListPoliciesWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) ListPoliciesWithResponse(ctx context.Context, params *ListPoliciesParams, reqEditors ...RequestEditorFn) (*ListPoliciesResponse, error)
ListPoliciesWithResponse request returning *ListPoliciesResponse
func (*ClientWithResponses) ListUserCredentialsWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) ListUserCredentialsWithResponse(ctx context.Context, userId string, params *ListUserCredentialsParams, reqEditors ...RequestEditorFn) (*ListUserCredentialsResponse, error)
ListUserCredentialsWithResponse request returning *ListUserCredentialsResponse
func (*ClientWithResponses) ListUserExternalPrincipalsWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) ListUserExternalPrincipalsWithResponse(ctx context.Context, userId string, params *ListUserExternalPrincipalsParams, reqEditors ...RequestEditorFn) (*ListUserExternalPrincipalsResponse, error)
ListUserExternalPrincipalsWithResponse request returning *ListUserExternalPrincipalsResponse
func (*ClientWithResponses) ListUserGroupsWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) ListUserGroupsWithResponse(ctx context.Context, userId string, params *ListUserGroupsParams, reqEditors ...RequestEditorFn) (*ListUserGroupsResponse, error)
ListUserGroupsWithResponse request returning *ListUserGroupsResponse
func (*ClientWithResponses) ListUserPoliciesWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) ListUserPoliciesWithResponse(ctx context.Context, userId string, params *ListUserPoliciesParams, reqEditors ...RequestEditorFn) (*ListUserPoliciesResponse, error)
ListUserPoliciesWithResponse request returning *ListUserPoliciesResponse
func (*ClientWithResponses) ListUsersWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) ListUsersWithResponse(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*ListUsersResponse, error)
ListUsersWithResponse request returning *ListUsersResponse
func (*ClientWithResponses) UpdatePasswordWithBodyWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) UpdatePasswordWithBodyWithResponse(ctx context.Context, userId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePasswordResponse, error)
UpdatePasswordWithBodyWithResponse request with arbitrary body returning *UpdatePasswordResponse
func (*ClientWithResponses) UpdatePasswordWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) UpdatePasswordWithResponse(ctx context.Context, userId string, body UpdatePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePasswordResponse, error)
func (*ClientWithResponses) UpdatePolicyWithBodyWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) UpdatePolicyWithBodyWithResponse(ctx context.Context, policyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePolicyResponse, error)
UpdatePolicyWithBodyWithResponse request with arbitrary body returning *UpdatePolicyResponse
func (*ClientWithResponses) UpdatePolicyWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) UpdatePolicyWithResponse(ctx context.Context, policyId string, body UpdatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePolicyResponse, error)
func (*ClientWithResponses) UpdateUserFriendlyNameWithBodyWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) UpdateUserFriendlyNameWithBodyWithResponse(ctx context.Context, userId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserFriendlyNameResponse, error)
UpdateUserFriendlyNameWithBodyWithResponse request with arbitrary body returning *UpdateUserFriendlyNameResponse
func (*ClientWithResponses) UpdateUserFriendlyNameWithResponse ¶ added in v1.77.0
func (c *ClientWithResponses) UpdateUserFriendlyNameWithResponse(ctx context.Context, userId string, body UpdateUserFriendlyNameJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserFriendlyNameResponse, error)
type ClientWithResponsesInterface ¶ added in v1.77.0
type ClientWithResponsesInterface interface {
// GetCredentials request
GetCredentialsWithResponse(ctx context.Context, accessKeyId string, reqEditors ...RequestEditorFn) (*GetCredentialsResponse, error)
// GetExternalPrincipal request
GetExternalPrincipalWithResponse(ctx context.Context, params *GetExternalPrincipalParams, reqEditors ...RequestEditorFn) (*GetExternalPrincipalResponse, error)
// ListGroups request
ListGroupsWithResponse(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*ListGroupsResponse, error)
// CreateGroup request with any body
CreateGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateGroupResponse, error)
CreateGroupWithResponse(ctx context.Context, body CreateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGroupResponse, error)
// DeleteGroup request
DeleteGroupWithResponse(ctx context.Context, groupId string, reqEditors ...RequestEditorFn) (*DeleteGroupResponse, error)
// GetGroup request
GetGroupWithResponse(ctx context.Context, groupId string, reqEditors ...RequestEditorFn) (*GetGroupResponse, error)
// ListGroupMembers request
ListGroupMembersWithResponse(ctx context.Context, groupId string, params *ListGroupMembersParams, reqEditors ...RequestEditorFn) (*ListGroupMembersResponse, error)
// DeleteGroupMembership request
DeleteGroupMembershipWithResponse(ctx context.Context, groupId string, userId string, reqEditors ...RequestEditorFn) (*DeleteGroupMembershipResponse, error)
// AddGroupMembership request
AddGroupMembershipWithResponse(ctx context.Context, groupId string, userId string, reqEditors ...RequestEditorFn) (*AddGroupMembershipResponse, error)
// ListGroupPolicies request
ListGroupPoliciesWithResponse(ctx context.Context, groupId string, params *ListGroupPoliciesParams, reqEditors ...RequestEditorFn) (*ListGroupPoliciesResponse, error)
// DetachPolicyFromGroup request
DetachPolicyFromGroupWithResponse(ctx context.Context, groupId string, policyId string, reqEditors ...RequestEditorFn) (*DetachPolicyFromGroupResponse, error)
// AttachPolicyToGroup request
AttachPolicyToGroupWithResponse(ctx context.Context, groupId string, policyId string, reqEditors ...RequestEditorFn) (*AttachPolicyToGroupResponse, error)
// ListPolicies request
ListPoliciesWithResponse(ctx context.Context, params *ListPoliciesParams, reqEditors ...RequestEditorFn) (*ListPoliciesResponse, error)
// CreatePolicy request with any body
CreatePolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePolicyResponse, error)
CreatePolicyWithResponse(ctx context.Context, body CreatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePolicyResponse, error)
// DeletePolicy request
DeletePolicyWithResponse(ctx context.Context, policyId string, reqEditors ...RequestEditorFn) (*DeletePolicyResponse, error)
// GetPolicy request
GetPolicyWithResponse(ctx context.Context, policyId string, reqEditors ...RequestEditorFn) (*GetPolicyResponse, error)
// UpdatePolicy request with any body
UpdatePolicyWithBodyWithResponse(ctx context.Context, policyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePolicyResponse, error)
UpdatePolicyWithResponse(ctx context.Context, policyId string, body UpdatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePolicyResponse, error)
// ClaimTokenId request with any body
ClaimTokenIdWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ClaimTokenIdResponse, error)
ClaimTokenIdWithResponse(ctx context.Context, body ClaimTokenIdJSONRequestBody, reqEditors ...RequestEditorFn) (*ClaimTokenIdResponse, error)
// ListUsers request
ListUsersWithResponse(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*ListUsersResponse, error)
// CreateUser request with any body
CreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
CreateUserWithResponse(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
// DeleteUser request
DeleteUserWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)
// GetUser request
GetUserWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*GetUserResponse, error)
// ListUserCredentials request
ListUserCredentialsWithResponse(ctx context.Context, userId string, params *ListUserCredentialsParams, reqEditors ...RequestEditorFn) (*ListUserCredentialsResponse, error)
// CreateCredentials request
CreateCredentialsWithResponse(ctx context.Context, userId string, params *CreateCredentialsParams, reqEditors ...RequestEditorFn) (*CreateCredentialsResponse, error)
// DeleteCredentials request
DeleteCredentialsWithResponse(ctx context.Context, userId string, accessKeyId string, reqEditors ...RequestEditorFn) (*DeleteCredentialsResponse, error)
// GetCredentialsForUser request
GetCredentialsForUserWithResponse(ctx context.Context, userId string, accessKeyId string, reqEditors ...RequestEditorFn) (*GetCredentialsForUserResponse, error)
// DeleteUserExternalPrincipal request
DeleteUserExternalPrincipalWithResponse(ctx context.Context, userId string, params *DeleteUserExternalPrincipalParams, reqEditors ...RequestEditorFn) (*DeleteUserExternalPrincipalResponse, error)
// CreateUserExternalPrincipal request
CreateUserExternalPrincipalWithResponse(ctx context.Context, userId string, params *CreateUserExternalPrincipalParams, reqEditors ...RequestEditorFn) (*CreateUserExternalPrincipalResponse, error)
// ListUserExternalPrincipals request
ListUserExternalPrincipalsWithResponse(ctx context.Context, userId string, params *ListUserExternalPrincipalsParams, reqEditors ...RequestEditorFn) (*ListUserExternalPrincipalsResponse, error)
// UpdateUserFriendlyName request with any body
UpdateUserFriendlyNameWithBodyWithResponse(ctx context.Context, userId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserFriendlyNameResponse, error)
UpdateUserFriendlyNameWithResponse(ctx context.Context, userId string, body UpdateUserFriendlyNameJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserFriendlyNameResponse, error)
// ListUserGroups request
ListUserGroupsWithResponse(ctx context.Context, userId string, params *ListUserGroupsParams, reqEditors ...RequestEditorFn) (*ListUserGroupsResponse, error)
// UpdatePassword request with any body
UpdatePasswordWithBodyWithResponse(ctx context.Context, userId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePasswordResponse, error)
UpdatePasswordWithResponse(ctx context.Context, userId string, body UpdatePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePasswordResponse, error)
// ListUserPolicies request
ListUserPoliciesWithResponse(ctx context.Context, userId string, params *ListUserPoliciesParams, reqEditors ...RequestEditorFn) (*ListUserPoliciesResponse, error)
// DetachPolicyFromUser request
DetachPolicyFromUserWithResponse(ctx context.Context, userId string, policyId string, reqEditors ...RequestEditorFn) (*DetachPolicyFromUserResponse, error)
// AttachPolicyToUser request
AttachPolicyToUserWithResponse(ctx context.Context, userId string, policyId string, reqEditors ...RequestEditorFn) (*AttachPolicyToUserResponse, error)
// GetVersion request
GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResponse, error)
// HealthCheck request
HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ConditionContext ¶ added in v1.71.0
ConditionContext holds contextual information for condition evaluation Fields is a map of field names to their string values (e.g., {"SourceIp": "203.0.113.5", "VpcId": "vpc-123"})
func NewConditionContext ¶ added in v1.71.0
func NewConditionContext(clientIP string) *ConditionContext
NewConditionContext creates a ConditionContext with the client IP in the SourceIp field This is the standard way to enrich context with client IP for IpAddress conditions
func NewConditionContextWithFields ¶ added in v1.71.0
func NewConditionContextWithFields(fields map[string]string) *ConditionContext
NewConditionContextWithFields creates a ConditionContext with custom field values This allows flexibility for future condition operators that may need different fields
type ConditionOperator ¶ added in v1.71.0
type ConditionOperator interface {
// Evaluate checks if the condition fields and values match the context
// fields is a map of field names to arrays of values (e.g., {"SourceIp": ["10.0.0.0/8", "192.168.1.0/24"]})
Evaluate(fields map[string][]string, conditionCtx *ConditionContext) (bool, error)
// Validate checks if the condition fields and values are valid
Validate(fields map[string][]string) error
}
ConditionOperator defines the interface for different condition operators
func OperatorFactory ¶ added in v1.71.0
func OperatorFactory(operatorName string) (ConditionOperator, error)
OperatorFactory returns the appropriate operator for a given operator name
type CreateCredentialsParams ¶ added in v1.77.0
type CreateCredentialsParams struct {
AccessKey *string `json:"access_key,omitempty"`
SecretKey *string `json:"secret_key,omitempty"`
}
CreateCredentialsParams defines parameters for CreateCredentials.
type CreateCredentialsResponse ¶ added in v1.77.0
type CreateCredentialsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *CredentialsWithSecret
JSON401 *Error
JSON404 *Error
JSON409 *Error
JSONDefault *Error
}
func ParseCreateCredentialsResponse ¶ added in v1.77.0
func ParseCreateCredentialsResponse(rsp *http.Response) (*CreateCredentialsResponse, error)
ParseCreateCredentialsResponse parses an HTTP response from a CreateCredentialsWithResponse call
func (CreateCredentialsResponse) Status ¶ added in v1.77.0
func (r CreateCredentialsResponse) Status() string
Status returns HTTPResponse.Status
func (CreateCredentialsResponse) StatusCode ¶ added in v1.77.0
func (r CreateCredentialsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateGroupJSONBody ¶ added in v1.77.0
type CreateGroupJSONBody GroupCreation
CreateGroupJSONBody defines parameters for CreateGroup.
type CreateGroupJSONRequestBody ¶ added in v1.77.0
type CreateGroupJSONRequestBody CreateGroupJSONBody
CreateGroupJSONRequestBody defines body for CreateGroup for application/json ContentType.
type CreateGroupResponse ¶ added in v1.77.0
type CreateGroupResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *Group
JSON401 *Error
JSON404 *Error
JSON409 *Error
JSONDefault *Error
}
func ParseCreateGroupResponse ¶ added in v1.77.0
func ParseCreateGroupResponse(rsp *http.Response) (*CreateGroupResponse, error)
ParseCreateGroupResponse parses an HTTP response from a CreateGroupWithResponse call
func (CreateGroupResponse) Status ¶ added in v1.77.0
func (r CreateGroupResponse) Status() string
Status returns HTTPResponse.Status
func (CreateGroupResponse) StatusCode ¶ added in v1.77.0
func (r CreateGroupResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreatePolicyJSONBody ¶ added in v1.77.0
type CreatePolicyJSONBody Policy
CreatePolicyJSONBody defines parameters for CreatePolicy.
type CreatePolicyJSONRequestBody ¶ added in v1.77.0
type CreatePolicyJSONRequestBody CreatePolicyJSONBody
CreatePolicyJSONRequestBody defines body for CreatePolicy for application/json ContentType.
type CreatePolicyResponse ¶ added in v1.77.0
type CreatePolicyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *Policy
JSON400 *Error
JSON401 *Error
JSON409 *Error
JSONDefault *Error
}
func ParseCreatePolicyResponse ¶ added in v1.77.0
func ParseCreatePolicyResponse(rsp *http.Response) (*CreatePolicyResponse, error)
ParseCreatePolicyResponse parses an HTTP response from a CreatePolicyWithResponse call
func (CreatePolicyResponse) Status ¶ added in v1.77.0
func (r CreatePolicyResponse) Status() string
Status returns HTTPResponse.Status
func (CreatePolicyResponse) StatusCode ¶ added in v1.77.0
func (r CreatePolicyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateUserExternalPrincipalParams ¶ added in v1.77.0
type CreateUserExternalPrincipalParams struct {
PrincipalId string `json:"principalId"`
}
CreateUserExternalPrincipalParams defines parameters for CreateUserExternalPrincipal.
type CreateUserExternalPrincipalResponse ¶ added in v1.77.0
type CreateUserExternalPrincipalResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Error
JSON409 *Error
JSONDefault *Error
}
func ParseCreateUserExternalPrincipalResponse ¶ added in v1.77.0
func ParseCreateUserExternalPrincipalResponse(rsp *http.Response) (*CreateUserExternalPrincipalResponse, error)
ParseCreateUserExternalPrincipalResponse parses an HTTP response from a CreateUserExternalPrincipalWithResponse call
func (CreateUserExternalPrincipalResponse) Status ¶ added in v1.77.0
func (r CreateUserExternalPrincipalResponse) Status() string
Status returns HTTPResponse.Status
func (CreateUserExternalPrincipalResponse) StatusCode ¶ added in v1.77.0
func (r CreateUserExternalPrincipalResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateUserJSONBody ¶ added in v1.77.0
type CreateUserJSONBody UserCreation
CreateUserJSONBody defines parameters for CreateUser.
type CreateUserJSONRequestBody ¶ added in v1.77.0
type CreateUserJSONRequestBody CreateUserJSONBody
CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.
type CreateUserResponse ¶ added in v1.77.0
type CreateUserResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *User
JSON400 *Error
JSON401 *Error
JSON409 *Error
JSONDefault *Error
}
func ParseCreateUserResponse ¶ added in v1.77.0
func ParseCreateUserResponse(rsp *http.Response) (*CreateUserResponse, error)
ParseCreateUserResponse parses an HTTP response from a CreateUserWithResponse call
func (CreateUserResponse) Status ¶ added in v1.77.0
func (r CreateUserResponse) Status() string
Status returns HTTPResponse.Status
func (CreateUserResponse) StatusCode ¶ added in v1.77.0
func (r CreateUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CredentialSetFn ¶
type CredentialSetFn func() (*model.Credential, error)
type Credentialler ¶ added in v0.53.0
type Credentialler interface {
GetCredentials(ctx context.Context, accessKeyID string) (*model.Credential, error)
}
Credentialler fetches S3-style credentials for access keys.
type Credentials ¶ added in v1.77.0
type Credentials struct {
AccessKeyId string `json:"access_key_id"`
// Unix Epoch in seconds
CreationDate int64 `json:"creation_date"`
}
Credentials defines model for Credentials.
type CredentialsCreator ¶ added in v0.69.0
type CredentialsList ¶ added in v1.77.0
type CredentialsList struct {
// The pagination mechanism is used to retrieve a list of items.
Pagination Pagination `json:"pagination"`
Results []Credentials `json:"results"`
}
CredentialsList defines model for CredentialsList.
type CredentialsWithSecret ¶ added in v1.77.0
type CredentialsWithSecret struct {
AccessKeyId string `json:"access_key_id"`
// Unix Epoch in seconds.
CreationDate int64 `json:"creation_date"`
SecretAccessKey string `json:"secret_access_key"`
UserId int64 `json:"user_id"`
// Important - this filed is required instead of the user_id which is deprecated. A unique identifier for the user. In password-based authentication should be the email.
UserName *string `json:"user_name,omitempty"`
}
CredentialsWithSecret defines model for CredentialsWithSecret.
type DeleteCredentialsResponse ¶ added in v1.77.0
type DeleteCredentialsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseDeleteCredentialsResponse ¶ added in v1.77.0
func ParseDeleteCredentialsResponse(rsp *http.Response) (*DeleteCredentialsResponse, error)
ParseDeleteCredentialsResponse parses an HTTP response from a DeleteCredentialsWithResponse call
func (DeleteCredentialsResponse) Status ¶ added in v1.77.0
func (r DeleteCredentialsResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteCredentialsResponse) StatusCode ¶ added in v1.77.0
func (r DeleteCredentialsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteGroupMembershipResponse ¶ added in v1.77.0
type DeleteGroupMembershipResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseDeleteGroupMembershipResponse ¶ added in v1.77.0
func ParseDeleteGroupMembershipResponse(rsp *http.Response) (*DeleteGroupMembershipResponse, error)
ParseDeleteGroupMembershipResponse parses an HTTP response from a DeleteGroupMembershipWithResponse call
func (DeleteGroupMembershipResponse) Status ¶ added in v1.77.0
func (r DeleteGroupMembershipResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteGroupMembershipResponse) StatusCode ¶ added in v1.77.0
func (r DeleteGroupMembershipResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteGroupResponse ¶ added in v1.77.0
type DeleteGroupResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseDeleteGroupResponse ¶ added in v1.77.0
func ParseDeleteGroupResponse(rsp *http.Response) (*DeleteGroupResponse, error)
ParseDeleteGroupResponse parses an HTTP response from a DeleteGroupWithResponse call
func (DeleteGroupResponse) Status ¶ added in v1.77.0
func (r DeleteGroupResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteGroupResponse) StatusCode ¶ added in v1.77.0
func (r DeleteGroupResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeletePolicyResponse ¶ added in v1.77.0
type DeletePolicyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseDeletePolicyResponse ¶ added in v1.77.0
func ParseDeletePolicyResponse(rsp *http.Response) (*DeletePolicyResponse, error)
ParseDeletePolicyResponse parses an HTTP response from a DeletePolicyWithResponse call
func (DeletePolicyResponse) Status ¶ added in v1.77.0
func (r DeletePolicyResponse) Status() string
Status returns HTTPResponse.Status
func (DeletePolicyResponse) StatusCode ¶ added in v1.77.0
func (r DeletePolicyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteUserExternalPrincipalParams ¶ added in v1.77.0
type DeleteUserExternalPrincipalParams struct {
PrincipalId string `json:"principalId"`
}
DeleteUserExternalPrincipalParams defines parameters for DeleteUserExternalPrincipal.
type DeleteUserExternalPrincipalResponse ¶ added in v1.77.0
type DeleteUserExternalPrincipalResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseDeleteUserExternalPrincipalResponse ¶ added in v1.77.0
func ParseDeleteUserExternalPrincipalResponse(rsp *http.Response) (*DeleteUserExternalPrincipalResponse, error)
ParseDeleteUserExternalPrincipalResponse parses an HTTP response from a DeleteUserExternalPrincipalWithResponse call
func (DeleteUserExternalPrincipalResponse) Status ¶ added in v1.77.0
func (r DeleteUserExternalPrincipalResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteUserExternalPrincipalResponse) StatusCode ¶ added in v1.77.0
func (r DeleteUserExternalPrincipalResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteUserResponse ¶ added in v1.77.0
type DeleteUserResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseDeleteUserResponse ¶ added in v1.77.0
func ParseDeleteUserResponse(rsp *http.Response) (*DeleteUserResponse, error)
ParseDeleteUserResponse parses an HTTP response from a DeleteUserWithResponse call
func (DeleteUserResponse) Status ¶ added in v1.77.0
func (r DeleteUserResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteUserResponse) StatusCode ¶ added in v1.77.0
func (r DeleteUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DetachPolicyFromGroupResponse ¶ added in v1.77.0
type DetachPolicyFromGroupResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseDetachPolicyFromGroupResponse ¶ added in v1.77.0
func ParseDetachPolicyFromGroupResponse(rsp *http.Response) (*DetachPolicyFromGroupResponse, error)
ParseDetachPolicyFromGroupResponse parses an HTTP response from a DetachPolicyFromGroupWithResponse call
func (DetachPolicyFromGroupResponse) Status ¶ added in v1.77.0
func (r DetachPolicyFromGroupResponse) Status() string
Status returns HTTPResponse.Status
func (DetachPolicyFromGroupResponse) StatusCode ¶ added in v1.77.0
func (r DetachPolicyFromGroupResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DetachPolicyFromUserResponse ¶ added in v1.77.0
type DetachPolicyFromUserResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseDetachPolicyFromUserResponse ¶ added in v1.77.0
func ParseDetachPolicyFromUserResponse(rsp *http.Response) (*DetachPolicyFromUserResponse, error)
ParseDetachPolicyFromUserResponse parses an HTTP response from a DetachPolicyFromUserWithResponse call
func (DetachPolicyFromUserResponse) Status ¶ added in v1.77.0
func (r DetachPolicyFromUserResponse) Status() string
Status returns HTTPResponse.Status
func (DetachPolicyFromUserResponse) StatusCode ¶ added in v1.77.0
func (r DetachPolicyFromUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DummyCache ¶
type DummyCache struct{}
DummyCache dummy cache that doesn't cache
func (*DummyCache) GetCredential ¶
func (d *DummyCache) GetCredential(_ string, setFn CredentialSetFn) (*model.Credential, error)
func (*DummyCache) GetExternalPrincipal ¶ added in v1.53.0
func (d *DummyCache) GetExternalPrincipal(_ string, setFn ExternalPrincipalFn) (*model.ExternalPrincipal, error)
func (*DummyCache) GetUserPolicies ¶
func (d *DummyCache) GetUserPolicies(_ string, setFn UserPoliciesSetFn) ([]*model.Policy, error)
type EmailInviter ¶ added in v0.111.0
type Error ¶ added in v1.77.0
type Error struct {
// The error message.
Message string `json:"message"`
}
Error defines model for Error.
type ExternalPrincipal ¶ added in v1.77.0
ExternalPrincipal defines model for ExternalPrincipal.
type ExternalPrincipalFn ¶ added in v1.53.0
type ExternalPrincipalFn func() (*model.ExternalPrincipal, error)
type ExternalPrincipalList ¶ added in v1.77.0
type ExternalPrincipalList struct {
// The pagination mechanism is used to retrieve a list of items.
Pagination Pagination `json:"pagination"`
Results []ExternalPrincipal `json:"results"`
}
ExternalPrincipalList defines model for ExternalPrincipalList.
type ExternalPrincipalsService ¶ added in v1.14.0
type ExternalPrincipalsService interface {
IsExternalPrincipalsEnabled(ctx context.Context) bool
CreateUserExternalPrincipal(ctx context.Context, userID, principalID string) error
DeleteUserExternalPrincipal(ctx context.Context, userID, principalID string) error
GetExternalPrincipal(ctx context.Context, principalID string) (*model.ExternalPrincipal, error)
ListUserExternalPrincipals(ctx context.Context, userID string, params *model.PaginationParams) ([]*model.ExternalPrincipal, *model.Paginator, error)
}
ExternalPrincipalsService is an interface for managing external principals (e.g. IAM users, groups, etc.) It's part of the AuthService api's and is used as an administrative API to that service.
type GatewayService ¶ added in v0.65.0
type GatewayService interface {
GetCredentials(_ context.Context, accessKey string) (*model.Credential, error)
GetUser(ctx context.Context, username string) (*model.User, error)
Authorize(_ context.Context, req *AuthorizationRequest) (*AuthorizationResponse, error)
ListEffectivePolicies(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
}
type GetCredentialsForUserResponse ¶ added in v1.77.0
type GetCredentialsForUserResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Credentials
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseGetCredentialsForUserResponse ¶ added in v1.77.0
func ParseGetCredentialsForUserResponse(rsp *http.Response) (*GetCredentialsForUserResponse, error)
ParseGetCredentialsForUserResponse parses an HTTP response from a GetCredentialsForUserWithResponse call
func (GetCredentialsForUserResponse) Status ¶ added in v1.77.0
func (r GetCredentialsForUserResponse) Status() string
Status returns HTTPResponse.Status
func (GetCredentialsForUserResponse) StatusCode ¶ added in v1.77.0
func (r GetCredentialsForUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetCredentialsResponse ¶ added in v1.77.0
type GetCredentialsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CredentialsWithSecret
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseGetCredentialsResponse ¶ added in v1.77.0
func ParseGetCredentialsResponse(rsp *http.Response) (*GetCredentialsResponse, error)
ParseGetCredentialsResponse parses an HTTP response from a GetCredentialsWithResponse call
func (GetCredentialsResponse) Status ¶ added in v1.77.0
func (r GetCredentialsResponse) Status() string
Status returns HTTPResponse.Status
func (GetCredentialsResponse) StatusCode ¶ added in v1.77.0
func (r GetCredentialsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetExternalPrincipalParams ¶ added in v1.77.0
type GetExternalPrincipalParams struct {
PrincipalId string `json:"principalId"`
}
GetExternalPrincipalParams defines parameters for GetExternalPrincipal.
type GetExternalPrincipalResponse ¶ added in v1.77.0
type GetExternalPrincipalResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ExternalPrincipal
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseGetExternalPrincipalResponse ¶ added in v1.77.0
func ParseGetExternalPrincipalResponse(rsp *http.Response) (*GetExternalPrincipalResponse, error)
ParseGetExternalPrincipalResponse parses an HTTP response from a GetExternalPrincipalWithResponse call
func (GetExternalPrincipalResponse) Status ¶ added in v1.77.0
func (r GetExternalPrincipalResponse) Status() string
Status returns HTTPResponse.Status
func (GetExternalPrincipalResponse) StatusCode ¶ added in v1.77.0
func (r GetExternalPrincipalResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetGroupResponse ¶ added in v1.77.0
type GetGroupResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Group
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseGetGroupResponse ¶ added in v1.77.0
func ParseGetGroupResponse(rsp *http.Response) (*GetGroupResponse, error)
ParseGetGroupResponse parses an HTTP response from a GetGroupWithResponse call
func (GetGroupResponse) Status ¶ added in v1.77.0
func (r GetGroupResponse) Status() string
Status returns HTTPResponse.Status
func (GetGroupResponse) StatusCode ¶ added in v1.77.0
func (r GetGroupResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPolicyResponse ¶ added in v1.77.0
type GetPolicyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Policy
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseGetPolicyResponse ¶ added in v1.77.0
func ParseGetPolicyResponse(rsp *http.Response) (*GetPolicyResponse, error)
ParseGetPolicyResponse parses an HTTP response from a GetPolicyWithResponse call
func (GetPolicyResponse) Status ¶ added in v1.77.0
func (r GetPolicyResponse) Status() string
Status returns HTTPResponse.Status
func (GetPolicyResponse) StatusCode ¶ added in v1.77.0
func (r GetPolicyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetUserResponse ¶ added in v1.77.0
type GetUserResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *User
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseGetUserResponse ¶ added in v1.77.0
func ParseGetUserResponse(rsp *http.Response) (*GetUserResponse, error)
ParseGetUserResponse parses an HTTP response from a GetUserWithResponse call
func (GetUserResponse) Status ¶ added in v1.77.0
func (r GetUserResponse) Status() string
Status returns HTTPResponse.Status
func (GetUserResponse) StatusCode ¶ added in v1.77.0
func (r GetUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetVersionResponse ¶ added in v1.77.0
type GetVersionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *VersionConfig
}
func ParseGetVersionResponse ¶ added in v1.77.0
func ParseGetVersionResponse(rsp *http.Response) (*GetVersionResponse, error)
ParseGetVersionResponse parses an HTTP response from a GetVersionWithResponse call
func (GetVersionResponse) Status ¶ added in v1.77.0
func (r GetVersionResponse) Status() string
Status returns HTTPResponse.Status
func (GetVersionResponse) StatusCode ¶ added in v1.77.0
func (r GetVersionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Group ¶ added in v1.77.0
type Group struct {
// Unix Epoch in seconds.
CreationDate int64 `json:"creation_date"`
Description *string `json:"description,omitempty"`
// A unique identifier of the group.
Id *string `json:"id,omitempty"`
// A unique identifier for the group, represented by a human-readable name.
Name string `json:"name"`
}
Group defines model for Group.
type GroupCreation ¶ added in v1.77.0
type GroupCreation struct {
Description *string `json:"description,omitempty"`
// A unique identifier for the group, represented by a human-readable name.
Id string `json:"id"`
}
GroupCreation defines model for GroupCreation.
type GroupList ¶ added in v1.77.0
type GroupList struct {
// The pagination mechanism is used to retrieve a list of items.
Pagination Pagination `json:"pagination"`
Results []Group `json:"results"`
}
GroupList defines model for GroupList.
type HealthCheckResponse ¶ added in v1.77.0
func ParseHealthCheckResponse ¶ added in v1.77.0
func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error)
ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call
func (HealthCheckResponse) Status ¶ added in v1.77.0
func (r HealthCheckResponse) Status() string
Status returns HTTPResponse.Status
func (HealthCheckResponse) StatusCode ¶ added in v1.77.0
func (r HealthCheckResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶ added in v1.77.0
Doer performs HTTP requests.
The standard http.Client implements this interface.
type IpAddressOperator ¶ added in v1.71.0
type IpAddressOperator struct {
// contains filtered or unexported fields
}
IpAddressOperator handles IP address matching with CIDR notation support Dynamically checks all field names that contain IP addresses in the condition
func (*IpAddressOperator) Evaluate ¶ added in v1.71.0
func (op *IpAddressOperator) Evaluate(fields map[string][]string, conditionCtx *ConditionContext) (bool, error)
Evaluate checks if the client IP matches any of the IP fields in the condition It iterates over all field names and checks them against context
type KVMetadataManager ¶ added in v0.69.0
type KVMetadataManager struct {
// contains filtered or unexported fields
}
func NewKVMetadataManager ¶ added in v0.69.0
func NewKVMetadataManager(version, fixedInstallationID, kvType string, store kv.Store) *KVMetadataManager
func (*KVMetadataManager) GetCommPrefs ¶ added in v0.87.0
func (m *KVMetadataManager) GetCommPrefs(ctx context.Context) (CommPrefs, error)
func (*KVMetadataManager) GetMetadata ¶ added in v0.102.0
func (*KVMetadataManager) GetSetupState ¶ added in v0.87.0
func (m *KVMetadataManager) GetSetupState(ctx context.Context) (SetupStateName, error)
func (*KVMetadataManager) IsCommPrefsSet ¶ added in v0.105.0
func (m *KVMetadataManager) IsCommPrefsSet(ctx context.Context) (bool, error)
func (*KVMetadataManager) IsInitialized ¶ added in v0.69.0
func (m *KVMetadataManager) IsInitialized(ctx context.Context) (bool, error)
func (*KVMetadataManager) UpdateCommPrefs ¶ added in v0.87.0
func (m *KVMetadataManager) UpdateCommPrefs(ctx context.Context, commPrefs *CommPrefs) (string, error)
UpdateCommPrefs - updates the comm prefs metadata. When commPrefs is nil, we assume the setup is done and the user didn't provide any comm prefs. The data can be provided later as the web UI verifies if the comm prefs are set.
func (*KVMetadataManager) UpdateSetupTimestamp ¶ added in v0.69.0
type LRUCache ¶
type LRUCache struct {
// contains filtered or unexported fields
}
func (*LRUCache) GetCredential ¶
func (c *LRUCache) GetCredential(accessKeyID string, setFn CredentialSetFn) (*model.Credential, error)
func (*LRUCache) GetExternalPrincipal ¶ added in v1.53.0
func (c *LRUCache) GetExternalPrincipal(key string, setFn ExternalPrincipalFn) (*model.ExternalPrincipal, error)
func (*LRUCache) GetUserPolicies ¶
type ListGroupMembersParams ¶ added in v1.77.0
type ListGroupMembersParams struct {
// Indicates the prefix that all returned items must start with for the purpose of filtering results.
Prefix *PaginationPrefix `json:"prefix,omitempty"`
// Indicates the starting point for the returned items. Items must be sorted by a specific parameter, and the response should include only those that come after the "after" value in the sorted list. This is used for pagination, as the next page needs to start from a specific point in the ordered items list.
After *PaginationAfter `json:"after,omitempty"`
// Specifies the number of items the server should return. It is used to determine how many results to display.
Amount *PaginationAmount `json:"amount,omitempty"`
}
ListGroupMembersParams defines parameters for ListGroupMembers.
type ListGroupMembersResponse ¶ added in v1.77.0
type ListGroupMembersResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *UserList
JSON401 *Error
JSONDefault *Error
}
func ParseListGroupMembersResponse ¶ added in v1.77.0
func ParseListGroupMembersResponse(rsp *http.Response) (*ListGroupMembersResponse, error)
ParseListGroupMembersResponse parses an HTTP response from a ListGroupMembersWithResponse call
func (ListGroupMembersResponse) Status ¶ added in v1.77.0
func (r ListGroupMembersResponse) Status() string
Status returns HTTPResponse.Status
func (ListGroupMembersResponse) StatusCode ¶ added in v1.77.0
func (r ListGroupMembersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListGroupPoliciesParams ¶ added in v1.77.0
type ListGroupPoliciesParams struct {
// Indicates the prefix that all returned items must start with for the purpose of filtering results.
Prefix *PaginationPrefix `json:"prefix,omitempty"`
// Indicates the starting point for the returned items. Items must be sorted by a specific parameter, and the response should include only those that come after the "after" value in the sorted list. This is used for pagination, as the next page needs to start from a specific point in the ordered items list.
After *PaginationAfter `json:"after,omitempty"`
// Specifies the number of items the server should return. It is used to determine how many results to display.
Amount *PaginationAmount `json:"amount,omitempty"`
}
ListGroupPoliciesParams defines parameters for ListGroupPolicies.
type ListGroupPoliciesResponse ¶ added in v1.77.0
type ListGroupPoliciesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PolicyList
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseListGroupPoliciesResponse ¶ added in v1.77.0
func ParseListGroupPoliciesResponse(rsp *http.Response) (*ListGroupPoliciesResponse, error)
ParseListGroupPoliciesResponse parses an HTTP response from a ListGroupPoliciesWithResponse call
func (ListGroupPoliciesResponse) Status ¶ added in v1.77.0
func (r ListGroupPoliciesResponse) Status() string
Status returns HTTPResponse.Status
func (ListGroupPoliciesResponse) StatusCode ¶ added in v1.77.0
func (r ListGroupPoliciesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListGroupsParams ¶ added in v1.77.0
type ListGroupsParams struct {
// Indicates the prefix that all returned items must start with for the purpose of filtering results.
Prefix *PaginationPrefix `json:"prefix,omitempty"`
// Indicates the starting point for the returned items. Items must be sorted by a specific parameter, and the response should include only those that come after the "after" value in the sorted list. This is used for pagination, as the next page needs to start from a specific point in the ordered items list.
After *PaginationAfter `json:"after,omitempty"`
// Specifies the number of items the server should return. It is used to determine how many results to display.
Amount *PaginationAmount `json:"amount,omitempty"`
}
ListGroupsParams defines parameters for ListGroups.
type ListGroupsResponse ¶ added in v1.77.0
type ListGroupsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GroupList
JSON401 *Error
JSONDefault *Error
}
func ParseListGroupsResponse ¶ added in v1.77.0
func ParseListGroupsResponse(rsp *http.Response) (*ListGroupsResponse, error)
ParseListGroupsResponse parses an HTTP response from a ListGroupsWithResponse call
func (ListGroupsResponse) Status ¶ added in v1.77.0
func (r ListGroupsResponse) Status() string
Status returns HTTPResponse.Status
func (ListGroupsResponse) StatusCode ¶ added in v1.77.0
func (r ListGroupsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListPoliciesParams ¶ added in v1.77.0
type ListPoliciesParams struct {
// Indicates the prefix that all returned items must start with for the purpose of filtering results.
Prefix *PaginationPrefix `json:"prefix,omitempty"`
// Indicates the starting point for the returned items. Items must be sorted by a specific parameter, and the response should include only those that come after the "after" value in the sorted list. This is used for pagination, as the next page needs to start from a specific point in the ordered items list.
After *PaginationAfter `json:"after,omitempty"`
// Specifies the number of items the server should return. It is used to determine how many results to display.
Amount *PaginationAmount `json:"amount,omitempty"`
}
ListPoliciesParams defines parameters for ListPolicies.
type ListPoliciesResponse ¶ added in v1.77.0
type ListPoliciesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PolicyList
JSON401 *Error
JSONDefault *Error
}
func ParseListPoliciesResponse ¶ added in v1.77.0
func ParseListPoliciesResponse(rsp *http.Response) (*ListPoliciesResponse, error)
ParseListPoliciesResponse parses an HTTP response from a ListPoliciesWithResponse call
func (ListPoliciesResponse) Status ¶ added in v1.77.0
func (r ListPoliciesResponse) Status() string
Status returns HTTPResponse.Status
func (ListPoliciesResponse) StatusCode ¶ added in v1.77.0
func (r ListPoliciesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListUserCredentialsParams ¶ added in v1.77.0
type ListUserCredentialsParams struct {
// Indicates the prefix that all returned items must start with for the purpose of filtering results.
Prefix *PaginationPrefix `json:"prefix,omitempty"`
// Indicates the starting point for the returned items. Items must be sorted by a specific parameter, and the response should include only those that come after the "after" value in the sorted list. This is used for pagination, as the next page needs to start from a specific point in the ordered items list.
After *PaginationAfter `json:"after,omitempty"`
// Specifies the number of items the server should return. It is used to determine how many results to display.
Amount *PaginationAmount `json:"amount,omitempty"`
}
ListUserCredentialsParams defines parameters for ListUserCredentials.
type ListUserCredentialsResponse ¶ added in v1.77.0
type ListUserCredentialsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CredentialsList
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseListUserCredentialsResponse ¶ added in v1.77.0
func ParseListUserCredentialsResponse(rsp *http.Response) (*ListUserCredentialsResponse, error)
ParseListUserCredentialsResponse parses an HTTP response from a ListUserCredentialsWithResponse call
func (ListUserCredentialsResponse) Status ¶ added in v1.77.0
func (r ListUserCredentialsResponse) Status() string
Status returns HTTPResponse.Status
func (ListUserCredentialsResponse) StatusCode ¶ added in v1.77.0
func (r ListUserCredentialsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListUserExternalPrincipalsParams ¶ added in v1.77.0
type ListUserExternalPrincipalsParams struct {
// Indicates the prefix that all returned items must start with for the purpose of filtering results.
Prefix *PaginationPrefix `json:"prefix,omitempty"`
// Indicates the starting point for the returned items. Items must be sorted by a specific parameter, and the response should include only those that come after the "after" value in the sorted list. This is used for pagination, as the next page needs to start from a specific point in the ordered items list.
After *PaginationAfter `json:"after,omitempty"`
// Specifies the number of items the server should return. It is used to determine how many results to display.
Amount *PaginationAmount `json:"amount,omitempty"`
}
ListUserExternalPrincipalsParams defines parameters for ListUserExternalPrincipals.
type ListUserExternalPrincipalsResponse ¶ added in v1.77.0
type ListUserExternalPrincipalsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ExternalPrincipalList
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseListUserExternalPrincipalsResponse ¶ added in v1.77.0
func ParseListUserExternalPrincipalsResponse(rsp *http.Response) (*ListUserExternalPrincipalsResponse, error)
ParseListUserExternalPrincipalsResponse parses an HTTP response from a ListUserExternalPrincipalsWithResponse call
func (ListUserExternalPrincipalsResponse) Status ¶ added in v1.77.0
func (r ListUserExternalPrincipalsResponse) Status() string
Status returns HTTPResponse.Status
func (ListUserExternalPrincipalsResponse) StatusCode ¶ added in v1.77.0
func (r ListUserExternalPrincipalsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListUserGroupsParams ¶ added in v1.77.0
type ListUserGroupsParams struct {
// Indicates the prefix that all returned items must start with for the purpose of filtering results.
Prefix *PaginationPrefix `json:"prefix,omitempty"`
// Indicates the starting point for the returned items. Items must be sorted by a specific parameter, and the response should include only those that come after the "after" value in the sorted list. This is used for pagination, as the next page needs to start from a specific point in the ordered items list.
After *PaginationAfter `json:"after,omitempty"`
// Specifies the number of items the server should return. It is used to determine how many results to display.
Amount *PaginationAmount `json:"amount,omitempty"`
}
ListUserGroupsParams defines parameters for ListUserGroups.
type ListUserGroupsResponse ¶ added in v1.77.0
type ListUserGroupsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GroupList
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseListUserGroupsResponse ¶ added in v1.77.0
func ParseListUserGroupsResponse(rsp *http.Response) (*ListUserGroupsResponse, error)
ParseListUserGroupsResponse parses an HTTP response from a ListUserGroupsWithResponse call
func (ListUserGroupsResponse) Status ¶ added in v1.77.0
func (r ListUserGroupsResponse) Status() string
Status returns HTTPResponse.Status
func (ListUserGroupsResponse) StatusCode ¶ added in v1.77.0
func (r ListUserGroupsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListUserPoliciesParams ¶ added in v1.77.0
type ListUserPoliciesParams struct {
// Indicates the prefix that all returned items must start with for the purpose of filtering results.
Prefix *PaginationPrefix `json:"prefix,omitempty"`
// Indicates the starting point for the returned items. Items must be sorted by a specific parameter, and the response should include only those that come after the "after" value in the sorted list. This is used for pagination, as the next page needs to start from a specific point in the ordered items list.
After *PaginationAfter `json:"after,omitempty"`
// Specifies the number of items the server should return. It is used to determine how many results to display.
Amount *PaginationAmount `json:"amount,omitempty"`
// If true, return all distinct policies attached to the user or any of the groups the user belongs to, otherwise, return only the policies directly attached to the user.
Effective *bool `json:"effective,omitempty"`
}
ListUserPoliciesParams defines parameters for ListUserPolicies.
type ListUserPoliciesResponse ¶ added in v1.77.0
type ListUserPoliciesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PolicyList
JSON401 *Error
JSON404 *Error
JSONDefault *Error
}
func ParseListUserPoliciesResponse ¶ added in v1.77.0
func ParseListUserPoliciesResponse(rsp *http.Response) (*ListUserPoliciesResponse, error)
ParseListUserPoliciesResponse parses an HTTP response from a ListUserPoliciesWithResponse call
func (ListUserPoliciesResponse) Status ¶ added in v1.77.0
func (r ListUserPoliciesResponse) Status() string
Status returns HTTPResponse.Status
func (ListUserPoliciesResponse) StatusCode ¶ added in v1.77.0
func (r ListUserPoliciesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListUsersParams ¶ added in v1.77.0
type ListUsersParams struct {
// Indicates the prefix that all returned items must start with for the purpose of filtering results.
Prefix *PaginationPrefix `json:"prefix,omitempty"`
// Indicates the starting point for the returned items. Items must be sorted by a specific parameter, and the response should include only those that come after the "after" value in the sorted list. This is used for pagination, as the next page needs to start from a specific point in the ordered items list.
After *PaginationAfter `json:"after,omitempty"`
// Specifies the number of items the server should return. It is used to determine how many results to display.
Amount *PaginationAmount `json:"amount,omitempty"`
Id *int64 `json:"id,omitempty"`
Email *string `json:"email,omitempty"`
// Used only in lakeFS Enterprise; not applicable in the lakeFS OSS version.
ExternalId *string `json:"external_id,omitempty"`
}
ListUsersParams defines parameters for ListUsers.
type ListUsersResponse ¶ added in v1.77.0
type ListUsersResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *UserList
JSON401 *Error
JSONDefault *Error
}
func ParseListUsersResponse ¶ added in v1.77.0
func ParseListUsersResponse(rsp *http.Response) (*ListUsersResponse, error)
ParseListUsersResponse parses an HTTP response from a ListUsersWithResponse call
func (ListUsersResponse) Status ¶ added in v1.77.0
func (r ListUsersResponse) Status() string
Status returns HTTPResponse.Status
func (ListUsersResponse) StatusCode ¶ added in v1.77.0
func (r ListUsersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type LoginClaims ¶ added in v1.53.0
type LoginClaims struct {
ID string `json:"jti,omitempty"`
Issuer string `json:"iss,omitempty"`
Subject string `json:"sub,omitempty"`
Audience string `json:"aud,omitempty"`
IssuedAt *jwt.NumericDate `json:"iat,omitempty"`
ExpiresAt *jwt.NumericDate `json:"exp,omitempty"`
}
LoginClaims is a struct that implements jwt.Claims interface for login authentication
func VerifyToken ¶ added in v0.64.0
func VerifyToken(secret []byte, tokenString string) (*LoginClaims, error)
func (LoginClaims) GetAudience ¶ added in v1.53.0
func (lc LoginClaims) GetAudience() (jwt.ClaimStrings, error)
GetAudience returns the claim's audience
func (LoginClaims) GetExpirationTime ¶ added in v1.53.0
func (lc LoginClaims) GetExpirationTime() (*jwt.NumericDate, error)
GetExpirationTime returns the claim's expiration time
func (LoginClaims) GetIssuedAt ¶ added in v1.53.0
func (lc LoginClaims) GetIssuedAt() (*jwt.NumericDate, error)
GetIssuedAt returns the claim's issued-at time
func (LoginClaims) GetIssuer ¶ added in v1.53.0
func (lc LoginClaims) GetIssuer() (string, error)
GetIssuer returns the claim's issuer
func (LoginClaims) GetNotBefore ¶ added in v1.53.0
func (lc LoginClaims) GetNotBefore() (*jwt.NumericDate, error)
GetNotBefore returns the claim's not-before time
func (LoginClaims) GetSubject ¶ added in v1.53.0
func (lc LoginClaims) GetSubject() (string, error)
GetSubject returns the claim's subject
type MetadataManager ¶
type MetadataManager interface {
IsInitialized(ctx context.Context) (bool, error)
GetSetupState(ctx context.Context) (SetupStateName, error)
UpdateCommPrefs(ctx context.Context, commPrefs *CommPrefs) (string, error)
IsCommPrefsSet(ctx context.Context) (bool, error)
UpdateSetupTimestamp(ctx context.Context, setupTime time.Time, authType string) error
GetMetadata(context.Context) (map[string]string, error)
}
type MissingPermissions ¶ added in v1.43.0
type MissingPermissions struct {
// Denied is a list of actions the user was denied for the attempt.
Denied []string
Unauthorized []string
}
func (*MissingPermissions) String ¶ added in v1.43.0
func (n *MissingPermissions) String() string
type MonitoredService ¶ added in v1.77.0
type MonitoredService struct {
Wrapped Service
Observe func(operation string, duration time.Duration, success bool)
}
func NewMonitoredAuthService ¶ added in v1.77.0
func NewMonitoredAuthService(service Service) *MonitoredService
func (*MonitoredService) AddCredentials ¶ added in v1.77.0
func (w *MonitoredService) AddCredentials(ctx context.Context, username string, accessKeyID string, secretAccessKey string) (*model.Credential, error)
func (*MonitoredService) AddUserToGroup ¶ added in v1.77.0
func (*MonitoredService) AttachPolicyToGroup ¶ added in v1.77.0
func (*MonitoredService) AttachPolicyToUser ¶ added in v1.77.0
func (*MonitoredService) Authorize ¶ added in v1.77.0
func (w *MonitoredService) Authorize(ctx context.Context, req *AuthorizationRequest) (*AuthorizationResponse, error)
func (*MonitoredService) Cache ¶ added in v1.77.0
func (w *MonitoredService) Cache() Cache
func (*MonitoredService) ClaimTokenIDOnce ¶ added in v1.77.0
func (*MonitoredService) CreateCredentials ¶ added in v1.77.0
func (w *MonitoredService) CreateCredentials(ctx context.Context, username string) (*model.Credential, error)
func (*MonitoredService) CreateGroup ¶ added in v1.77.0
func (*MonitoredService) CreateUser ¶ added in v1.77.0
func (*MonitoredService) CreateUserExternalPrincipal ¶ added in v1.77.0
func (*MonitoredService) DeleteCredentials ¶ added in v1.77.0
func (*MonitoredService) DeleteGroup ¶ added in v1.77.0
func (w *MonitoredService) DeleteGroup(ctx context.Context, groupID string) error
func (*MonitoredService) DeletePolicy ¶ added in v1.77.0
func (w *MonitoredService) DeletePolicy(ctx context.Context, policyDisplayName string) error
func (*MonitoredService) DeleteUser ¶ added in v1.77.0
func (w *MonitoredService) DeleteUser(ctx context.Context, username string) error
func (*MonitoredService) DeleteUserExternalPrincipal ¶ added in v1.77.0
func (*MonitoredService) DetachPolicyFromGroup ¶ added in v1.77.0
func (*MonitoredService) DetachPolicyFromUser ¶ added in v1.77.0
func (*MonitoredService) GetCredentials ¶ added in v1.77.0
func (w *MonitoredService) GetCredentials(ctx context.Context, accessKeyID string) (*model.Credential, error)
func (*MonitoredService) GetCredentialsForUser ¶ added in v1.77.0
func (w *MonitoredService) GetCredentialsForUser(ctx context.Context, username string, accessKeyID string) (*model.Credential, error)
func (*MonitoredService) GetExternalPrincipal ¶ added in v1.77.0
func (w *MonitoredService) GetExternalPrincipal(ctx context.Context, principalID string) (*model.ExternalPrincipal, error)
func (*MonitoredService) GetUserByEmail ¶ added in v1.77.0
func (*MonitoredService) GetUserByExternalID ¶ added in v1.77.0
func (*MonitoredService) GetUserByID ¶ added in v1.77.0
func (*MonitoredService) IsAdvancedAuth ¶ added in v1.77.0
func (w *MonitoredService) IsAdvancedAuth() bool
func (*MonitoredService) IsExternalPrincipalsEnabled ¶ added in v1.77.0
func (w *MonitoredService) IsExternalPrincipalsEnabled(ctx context.Context) bool
func (*MonitoredService) ListEffectivePolicies ¶ added in v1.77.0
func (*MonitoredService) ListGroupPolicies ¶ added in v1.77.0
func (*MonitoredService) ListGroupUsers ¶ added in v1.77.0
func (*MonitoredService) ListGroups ¶ added in v1.77.0
func (w *MonitoredService) ListGroups(ctx context.Context, params *model.PaginationParams) ([]*model.Group, *model.Paginator, error)
func (*MonitoredService) ListPolicies ¶ added in v1.77.0
func (w *MonitoredService) ListPolicies(ctx context.Context, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
func (*MonitoredService) ListUserCredentials ¶ added in v1.77.0
func (w *MonitoredService) ListUserCredentials(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Credential, *model.Paginator, error)
func (*MonitoredService) ListUserExternalPrincipals ¶ added in v1.77.0
func (w *MonitoredService) ListUserExternalPrincipals(ctx context.Context, userID string, params *model.PaginationParams) ([]*model.ExternalPrincipal, *model.Paginator, error)
func (*MonitoredService) ListUserGroups ¶ added in v1.77.0
func (*MonitoredService) ListUserPolicies ¶ added in v1.77.0
func (*MonitoredService) ListUsers ¶ added in v1.77.0
func (w *MonitoredService) ListUsers(ctx context.Context, params *model.PaginationParams) ([]*model.User, *model.Paginator, error)
func (*MonitoredService) RemoveUserFromGroup ¶ added in v1.77.0
func (*MonitoredService) SecretStore ¶ added in v1.77.0
func (w *MonitoredService) SecretStore() crypt.SecretStore
func (*MonitoredService) UpdateUserFriendlyName ¶ added in v1.77.0
func (*MonitoredService) WritePolicy ¶ added in v1.77.0
type MonitoredServiceAndInviter ¶ added in v1.77.0
type MonitoredServiceAndInviter struct {
Wrapped ServiceAndInviter
Observe func(operation string, duration time.Duration, success bool)
}
func NewMonitoredAuthServiceAndInviter ¶ added in v1.77.0
func NewMonitoredAuthServiceAndInviter(service ServiceAndInviter) *MonitoredServiceAndInviter
func (*MonitoredServiceAndInviter) AddCredentials ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) AddCredentials(ctx context.Context, username string, accessKeyID string, secretAccessKey string) (*model.Credential, error)
func (*MonitoredServiceAndInviter) AddUserToGroup ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) AttachPolicyToGroup ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) AttachPolicyToUser ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) Authorize ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) Authorize(ctx context.Context, req *AuthorizationRequest) (*AuthorizationResponse, error)
func (*MonitoredServiceAndInviter) Cache ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) Cache() Cache
func (*MonitoredServiceAndInviter) ClaimTokenIDOnce ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) CreateCredentials ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) CreateCredentials(ctx context.Context, username string) (*model.Credential, error)
func (*MonitoredServiceAndInviter) CreateGroup ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) CreateUser ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) CreateUserExternalPrincipal ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) DeleteCredentials ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) DeleteGroup ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) DeleteGroup(ctx context.Context, groupID string) error
func (*MonitoredServiceAndInviter) DeletePolicy ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) DeletePolicy(ctx context.Context, policyDisplayName string) error
func (*MonitoredServiceAndInviter) DeleteUser ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) DeleteUser(ctx context.Context, username string) error
func (*MonitoredServiceAndInviter) DeleteUserExternalPrincipal ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) DetachPolicyFromGroup ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) DetachPolicyFromUser ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) GetCredentials ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) GetCredentials(ctx context.Context, accessKeyID string) (*model.Credential, error)
func (*MonitoredServiceAndInviter) GetCredentialsForUser ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) GetCredentialsForUser(ctx context.Context, username string, accessKeyID string) (*model.Credential, error)
func (*MonitoredServiceAndInviter) GetExternalPrincipal ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) GetExternalPrincipal(ctx context.Context, principalID string) (*model.ExternalPrincipal, error)
func (*MonitoredServiceAndInviter) GetUserByEmail ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) GetUserByExternalID ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) GetUserByID ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) InviteUser ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) InviteUser(ctx context.Context, email string) error
func (*MonitoredServiceAndInviter) IsAdvancedAuth ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) IsAdvancedAuth() bool
func (*MonitoredServiceAndInviter) IsExternalPrincipalsEnabled ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) IsExternalPrincipalsEnabled(ctx context.Context) bool
func (*MonitoredServiceAndInviter) ListEffectivePolicies ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) ListGroupPolicies ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) ListGroupUsers ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) ListGroups ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) ListGroups(ctx context.Context, params *model.PaginationParams) ([]*model.Group, *model.Paginator, error)
func (*MonitoredServiceAndInviter) ListPolicies ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) ListPolicies(ctx context.Context, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
func (*MonitoredServiceAndInviter) ListUserCredentials ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) ListUserCredentials(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Credential, *model.Paginator, error)
func (*MonitoredServiceAndInviter) ListUserExternalPrincipals ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) ListUserExternalPrincipals(ctx context.Context, userID string, params *model.PaginationParams) ([]*model.ExternalPrincipal, *model.Paginator, error)
func (*MonitoredServiceAndInviter) ListUserGroups ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) ListUserPolicies ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) ListUsers ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) ListUsers(ctx context.Context, params *model.PaginationParams) ([]*model.User, *model.Paginator, error)
func (*MonitoredServiceAndInviter) RemoveUserFromGroup ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) SecretStore ¶ added in v1.77.0
func (w *MonitoredServiceAndInviter) SecretStore() crypt.SecretStore
func (*MonitoredServiceAndInviter) UpdateUserFriendlyName ¶ added in v1.77.0
func (*MonitoredServiceAndInviter) WritePolicy ¶ added in v1.77.0
type Pagination ¶ added in v1.77.0
type Pagination struct {
// A boolean indicating whether the Next page is available.
HasMore bool `json:"has_more"`
// Maximum number of entries per page.
MaxPerPage int `json:"max_per_page"`
// A value used to retrieve the next page of results. This value is typically passed as the after parameter in the subsequent API call. The next page will include all items appearing after the specified next_offset.
NextOffset string `json:"next_offset"`
// Number of values in the results.
Results int `json:"results"`
}
Pagination defines model for Pagination.
type PaginationAfter ¶ added in v1.77.0
type PaginationAfter string
PaginationAfter defines model for PaginationAfter.
type PaginationAmount ¶ added in v1.77.0
type PaginationAmount int
PaginationAmount defines model for PaginationAmount.
type PaginationPrefix ¶ added in v1.77.0
type PaginationPrefix string
PaginationPrefix defines model for PaginationPrefix.
type Policy ¶ added in v1.77.0
type Policy struct {
// Represents the access control list assigned to this policy.
Acl *string `json:"acl,omitempty"`
// Unix Epoch in seconds.
CreationDate *int64 `json:"creation_date,omitempty"`
// A unique, human-readable name for the policy.
Name string `json:"name"`
Statement []Statement `json:"statement"`
}
Policy defines model for Policy.
type PolicyCondition ¶ added in v1.77.0
PolicyCondition defines model for PolicyCondition.
func (PolicyCondition) Get ¶ added in v1.77.0
func (a PolicyCondition) Get(fieldName string) (value []string, found bool)
Getter for additional properties for PolicyCondition. Returns the specified element and whether it was found
func (PolicyCondition) MarshalJSON ¶ added in v1.77.0
func (a PolicyCondition) MarshalJSON() ([]byte, error)
Override default JSON handling for PolicyCondition to handle AdditionalProperties
func (*PolicyCondition) Set ¶ added in v1.77.0
func (a *PolicyCondition) Set(fieldName string, value []string)
Setter for additional properties for PolicyCondition
func (*PolicyCondition) UnmarshalJSON ¶ added in v1.77.0
func (a *PolicyCondition) UnmarshalJSON(b []byte) error
Override default JSON handling for PolicyCondition to handle AdditionalProperties
type PolicyList ¶ added in v1.77.0
type PolicyList struct {
// The pagination mechanism is used to retrieve a list of items.
Pagination Pagination `json:"pagination"`
Results []Policy `json:"results"`
}
PolicyList defines model for PolicyList.
type RequestEditorFn ¶ added in v1.77.0
RequestEditorFn is the function signature for the RequestEditor callback function
func AddRequestID ¶ added in v1.77.0
func AddRequestID(headerName string) RequestEditorFn
AddRequestID returns a RequestEditorFn that puts the RequestID from the context logging field on every client request.
type ServerError ¶ added in v1.77.0
type ServerError Error
ServerError defines model for ServerError.
type Service ¶
type Service interface {
IsAdvancedAuth() bool
SecretStore() crypt.SecretStore
Cache() Cache
// users
CreateUser(ctx context.Context, user *model.User) (string, error)
DeleteUser(ctx context.Context, username string) error
GetUserByID(ctx context.Context, userID string) (*model.User, error)
GetUser(ctx context.Context, username string) (*model.User, error)
GetUserByExternalID(ctx context.Context, externalID string) (*model.User, error)
GetUserByEmail(ctx context.Context, email string) (*model.User, error)
ListUsers(ctx context.Context, params *model.PaginationParams) ([]*model.User, *model.Paginator, error)
UpdateUserFriendlyName(ctx context.Context, userID string, friendlyName string) error
ExternalPrincipalsService
// groups
CreateGroup(ctx context.Context, group *model.Group) (*model.Group, error)
DeleteGroup(ctx context.Context, groupID string) error
GetGroup(ctx context.Context, groupID string) (*model.Group, error)
ListGroups(ctx context.Context, params *model.PaginationParams) ([]*model.Group, *model.Paginator, error)
// group<->user memberships
AddUserToGroup(ctx context.Context, username, groupID string) error
RemoveUserFromGroup(ctx context.Context, username, groupID string) error
ListUserGroups(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Group, *model.Paginator, error)
ListGroupUsers(ctx context.Context, groupID string, params *model.PaginationParams) ([]*model.User, *model.Paginator, error)
// policies
WritePolicy(ctx context.Context, policy *model.Policy, update bool) error
GetPolicy(ctx context.Context, policyDisplayName string) (*model.Policy, error)
DeletePolicy(ctx context.Context, policyDisplayName string) error
ListPolicies(ctx context.Context, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
// credentials
CredentialsCreator
AddCredentials(ctx context.Context, username, accessKeyID, secretAccessKey string) (*model.Credential, error)
DeleteCredentials(ctx context.Context, username, accessKeyID string) error
GetCredentialsForUser(ctx context.Context, username, accessKeyID string) (*model.Credential, error)
GetCredentials(ctx context.Context, accessKeyID string) (*model.Credential, error)
ListUserCredentials(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Credential, *model.Paginator, error)
// policy<->user attachments
AttachPolicyToUser(ctx context.Context, policyDisplayName, username string) error
DetachPolicyFromUser(ctx context.Context, policyDisplayName, username string) error
ListUserPolicies(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
ListEffectivePolicies(ctx context.Context, username string, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
// policy<->group attachments
AttachPolicyToGroup(ctx context.Context, policyDisplayName, groupID string) error
DetachPolicyFromGroup(ctx context.Context, policyDisplayName, groupID string) error
ListGroupPolicies(ctx context.Context, groupID string, params *model.PaginationParams) ([]*model.Policy, *model.Paginator, error)
Authorizer
ClaimTokenIDOnce(ctx context.Context, tokenID string, expiresAt int64) error
}
type ServiceAndInviter ¶ added in v1.28.0
type ServiceAndInviter interface {
Service
EmailInviter
}
type SetupStateName ¶ added in v0.87.0
type SetupStateName string
const ( SetupStateInitialized SetupStateName = "initialized" SetupStateNotInitialized SetupStateName = "not_initialized" )
type Statement ¶ added in v1.77.0
type Statement struct {
Action []string `json:"action"`
// Optional conditions for when this statement applies.
Condition *Statement_Condition `json:"condition,omitempty"`
Effect string `json:"effect"`
Resource string `json:"resource"`
}
Statement defines model for Statement.
type Statement_Condition ¶ added in v1.77.0
type Statement_Condition struct {
AdditionalProperties map[string]PolicyCondition `json:"-"`
}
Statement_Condition defines model for Statement.Condition.
func (Statement_Condition) Get ¶ added in v1.77.0
func (a Statement_Condition) Get(fieldName string) (value PolicyCondition, found bool)
Getter for additional properties for Statement_Condition. Returns the specified element and whether it was found
func (Statement_Condition) MarshalJSON ¶ added in v1.77.0
func (a Statement_Condition) MarshalJSON() ([]byte, error)
Override default JSON handling for Statement_Condition to handle AdditionalProperties
func (*Statement_Condition) Set ¶ added in v1.77.0
func (a *Statement_Condition) Set(fieldName string, value PolicyCondition)
Setter for additional properties for Statement_Condition
func (*Statement_Condition) UnmarshalJSON ¶ added in v1.77.0
func (a *Statement_Condition) UnmarshalJSON(b []byte) error
Override default JSON handling for Statement_Condition to handle AdditionalProperties
type Unauthorized ¶ added in v1.77.0
type Unauthorized Error
Unauthorized defines model for Unauthorized.
type UpdatePasswordJSONBody ¶ added in v1.77.0
type UpdatePasswordJSONBody UserPassword
UpdatePasswordJSONBody defines parameters for UpdatePassword.
type UpdatePasswordJSONRequestBody ¶ added in v1.77.0
type UpdatePasswordJSONRequestBody UpdatePasswordJSONBody
UpdatePasswordJSONRequestBody defines body for UpdatePassword for application/json ContentType.
type UpdatePasswordResponse ¶ added in v1.77.0
type UpdatePasswordResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *Error
JSON401 *Error
JSONDefault *Error
}
func ParseUpdatePasswordResponse ¶ added in v1.77.0
func ParseUpdatePasswordResponse(rsp *http.Response) (*UpdatePasswordResponse, error)
ParseUpdatePasswordResponse parses an HTTP response from a UpdatePasswordWithResponse call
func (UpdatePasswordResponse) Status ¶ added in v1.77.0
func (r UpdatePasswordResponse) Status() string
Status returns HTTPResponse.Status
func (UpdatePasswordResponse) StatusCode ¶ added in v1.77.0
func (r UpdatePasswordResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdatePolicyJSONBody ¶ added in v1.77.0
type UpdatePolicyJSONBody Policy
UpdatePolicyJSONBody defines parameters for UpdatePolicy.
type UpdatePolicyJSONRequestBody ¶ added in v1.77.0
type UpdatePolicyJSONRequestBody UpdatePolicyJSONBody
UpdatePolicyJSONRequestBody defines body for UpdatePolicy for application/json ContentType.
type UpdatePolicyResponse ¶ added in v1.77.0
type UpdatePolicyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Policy
JSON400 *Error
JSON401 *Error
JSONDefault *Error
}
func ParseUpdatePolicyResponse ¶ added in v1.77.0
func ParseUpdatePolicyResponse(rsp *http.Response) (*UpdatePolicyResponse, error)
ParseUpdatePolicyResponse parses an HTTP response from a UpdatePolicyWithResponse call
func (UpdatePolicyResponse) Status ¶ added in v1.77.0
func (r UpdatePolicyResponse) Status() string
Status returns HTTPResponse.Status
func (UpdatePolicyResponse) StatusCode ¶ added in v1.77.0
func (r UpdatePolicyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateUserFriendlyNameJSONBody ¶ added in v1.77.0
type UpdateUserFriendlyNameJSONBody struct {
FriendlyName string `json:"friendly_name"`
}
UpdateUserFriendlyNameJSONBody defines parameters for UpdateUserFriendlyName.
type UpdateUserFriendlyNameJSONRequestBody ¶ added in v1.77.0
type UpdateUserFriendlyNameJSONRequestBody UpdateUserFriendlyNameJSONBody
UpdateUserFriendlyNameJSONRequestBody defines body for UpdateUserFriendlyName for application/json ContentType.
type UpdateUserFriendlyNameResponse ¶ added in v1.77.0
type UpdateUserFriendlyNameResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *Error
JSON401 *Error
JSONDefault *Error
}
func ParseUpdateUserFriendlyNameResponse ¶ added in v1.77.0
func ParseUpdateUserFriendlyNameResponse(rsp *http.Response) (*UpdateUserFriendlyNameResponse, error)
ParseUpdateUserFriendlyNameResponse parses an HTTP response from a UpdateUserFriendlyNameWithResponse call
func (UpdateUserFriendlyNameResponse) Status ¶ added in v1.77.0
func (r UpdateUserFriendlyNameResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateUserFriendlyNameResponse) StatusCode ¶ added in v1.77.0
func (r UpdateUserFriendlyNameResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type User ¶ added in v1.77.0
type User struct {
// Unix Epoch in seconds.
CreationDate int64 `json:"creation_date"`
Email *string `json:"email,omitempty"`
// Represents an encrypted password as a string.
EncryptedPassword []byte `json:"encryptedPassword"`
ExternalId *string `json:"external_id,omitempty"`
// A name for the user that is not necessarily unique.
FriendlyName *string `json:"friendly_name,omitempty"`
// User source. Based on implementation.
Source *string `json:"source,omitempty"`
// A unique identifier for the user.
Username string `json:"username"`
}
User defines model for User.
type UserCreation ¶ added in v1.77.0
type UserCreation struct {
// If provided, the email is set to the same value as the username.
Email *string `json:"email,omitempty"`
// Represents an encrypted password as a string.
EncryptedPassword *[]byte `json:"encryptedPassword,omitempty"`
ExternalId *string `json:"external_id,omitempty"`
FriendlyName *string `json:"friendlyName,omitempty"`
// A boolean that determines whether an invitation email should be sent to a user for account creation. If passed and set to true, the invitation email will be sent along with the user creation.
Invite *bool `json:"invite,omitempty"`
// User source. Based on implementation.
Source *string `json:"source,omitempty"`
// A unique identifier for the user. For password-based authentication, it is the email.
Username string `json:"username"`
}
UserCreation defines model for UserCreation.
type UserList ¶ added in v1.77.0
type UserList struct {
// The pagination mechanism is used to retrieve a list of items.
Pagination Pagination `json:"pagination"`
Results []User `json:"results"`
}
UserList defines model for UserList.
type UserPassword ¶ added in v1.77.0
type UserPassword struct {
EncryptedPassword []byte `json:"encryptedPassword"`
}
UserPassword defines model for UserPassword.
type UserPoliciesSetFn ¶
type ValidationError ¶ added in v1.77.0
type ValidationError Error
ValidationError defines model for ValidationError.
type VersionConfig ¶ added in v1.77.0
type VersionConfig struct {
Version string `json:"version"`
}
VersionConfig defines model for VersionConfig.
Notes ¶
Bugs ¶
This parser does not handle resource types. Handling resource types is
subtle: they may be separated from resource IDs by a colon OR by a slash. For an example of a resource type, see ECS[1] (uses only slash separators). That colons are an acceptable separator appears in [2], so a workaround to this limitation is to use a slash. [1] https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-resources [2] https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-syntax