Documentation
¶
Index ¶
- Constants
- Variables
- func ValidateMatchingRule(rule string) error
- func ValidateStatement(stmt string) error
- type APIError
- type APIKey
- type AuthPolicy
- type AuthPolicyWire
- type BulkEditOpIn
- type BulkEditResourceIn
- type BulkEditTagsIn
- type BulkError
- type BulkJob
- type BulkOp
- type BulkResult
- type BulkTarget
- type Capabilities
- type Compartment
- type CompartmentFilter
- type CompartmentUsage
- type ConfigProvider
- type CreateCompartmentIn
- type CreateDynamicGroupIn
- type CreateGroupIn
- type CreateIDPIn
- type CreateNetworkSourceIn
- type CreatePolicyIn
- type CreateTagDefaultIn
- type CreateTagIn
- type CreateTagNamespaceIn
- type CreateUserIn
- type Credential
- type DynamicGroup
- type Group
- type Handler
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Shutdown(ctx context.Context)
- func (h *Handler) Snapshot(ctx context.Context) []byte
- func (h *Handler) StartWorker(ctx context.Context) error
- type IdentityProvider
- type IdentityProviderWire
- type IdpGroupMapping
- type IdpGroupMappingWire
- type InMemoryBackend
- func (b *InMemoryBackend) AddCompartmentUsage(fn CompartmentUsage)
- func (b *InMemoryBackend) AddUserToGroup(userID, groupID string) (membershipWire, string, error)
- func (b *InMemoryBackend) BulkDeleteTags(ids []string, token string) (string, error)
- func (b *InMemoryBackend) BulkEditTags(in BulkEditTagsIn) (string, error)
- func (b *InMemoryBackend) CascadeDeleteTagNamespace(id, ifMatch, token string) (string, error)
- func (b *InMemoryBackend) ChangeTagNamespaceCompartment(id, compartment, token string) error
- func (b *InMemoryBackend) CompartmentActive(id string) bool
- func (b *InMemoryBackend) CompartmentName(id string) string
- func (b *InMemoryBackend) CompartmentWithin(id, ancestor string) bool
- func (b *InMemoryBackend) CreateCompartment(in CreateCompartmentIn) (compartmentWire, string, error)
- func (b *InMemoryBackend) CreateDynamicGroup(in CreateDynamicGroupIn) (dynamicGroupWire, string, error)
- func (b *InMemoryBackend) CreateGroup(in CreateGroupIn) (Meta, string, error)
- func (b *InMemoryBackend) CreateIdentityProvider(in CreateIDPIn) (IdentityProviderWire, string, error)
- func (b *InMemoryBackend) CreateIdpGroupMapping(idpID, group, groupID, token string) (IdpGroupMappingWire, string, error)
- func (b *InMemoryBackend) CreateNetworkSource(in CreateNetworkSourceIn) (NetworkSourceWire, string, error)
- func (b *InMemoryBackend) CreatePolicy(in CreatePolicyIn) (policyWire, string, error)
- func (b *InMemoryBackend) CreateRegionSubscription(tenancy, key, token string) (regionSubWire, error)
- func (b *InMemoryBackend) CreateTag(nsID string, in CreateTagIn) (tagWire, string, error)
- func (b *InMemoryBackend) CreateTagDefault(in CreateTagDefaultIn) (tagDefaultWire, string, error)
- func (b *InMemoryBackend) CreateTagNamespace(in CreateTagNamespaceIn) (tagNamespaceWire, string, error)
- func (b *InMemoryBackend) CreateUser(in CreateUserIn) (userWire, string, error)
- func (b *InMemoryBackend) CustomerSecretKey(accessKey string) (string, string, bool)
- func (b *InMemoryBackend) DeleteAPIKey(userID, fingerprint string) error
- func (b *InMemoryBackend) DeleteCompartment(id, ifMatch string) (string, error)
- func (b *InMemoryBackend) DeleteCredential(userID, id string, kind credKind) error
- func (b *InMemoryBackend) DeleteDynamicGroup(id, ifMatch string) error
- func (b *InMemoryBackend) DeleteGroup(id, ifMatch string) error
- func (b *InMemoryBackend) DeleteIdentityProvider(id, ifMatch string) error
- func (b *InMemoryBackend) DeleteIdpGroupMapping(idpID, id, ifMatch string) error
- func (b *InMemoryBackend) DeleteNetworkSource(id, ifMatch string) error
- func (b *InMemoryBackend) DeletePolicy(id, ifMatch string) error
- func (b *InMemoryBackend) DeleteTag(nsID, name, ifMatch string) (string, error)
- func (b *InMemoryBackend) DeleteTagDefault(id string) error
- func (b *InMemoryBackend) DeleteTagNamespace(id, ifMatch string) error
- func (b *InMemoryBackend) DeleteUser(id, ifMatch string) error
- func (b *InMemoryBackend) GetAuthenticationPolicy(compartment string) (AuthPolicyWire, string, error)
- func (b *InMemoryBackend) GetCompartment(id string) (compartmentWire, string, error)
- func (b *InMemoryBackend) GetDynamicGroup(id string) (dynamicGroupWire, string, error)
- func (b *InMemoryBackend) GetGroup(id string) (Meta, string, error)
- func (b *InMemoryBackend) GetIdentityProvider(id string) (IdentityProviderWire, string, error)
- func (b *InMemoryBackend) GetIdpGroupMapping(idpID, id string) (IdpGroupMappingWire, string, error)
- func (b *InMemoryBackend) GetMembership(id string) (membershipWire, error)
- func (b *InMemoryBackend) GetNetworkSource(id string) (NetworkSourceWire, string, error)
- func (b *InMemoryBackend) GetPolicy(id string) (policyWire, string, error)
- func (b *InMemoryBackend) GetTag(nsID, name string) (tagWire, string, error)
- func (b *InMemoryBackend) GetTagDefault(id string) (tagDefaultWire, error)
- func (b *InMemoryBackend) GetTagNamespace(id string) (tagNamespaceWire, string, error)
- func (b *InMemoryBackend) GetTaggingWorkRequest(id string) (WorkRequestWire, error)
- func (b *InMemoryBackend) GetTenancy(id string) (tenancyWire, error)
- func (b *InMemoryBackend) GetUIPasswordInfo(userID string) (uiPasswordWire, error)
- func (b *InMemoryBackend) GetUser(id string) (userWire, string, error)
- func (b *InMemoryBackend) GetWorkRequest(id string) (WorkRequestWire, error)
- func (b *InMemoryBackend) ListAPIKeys(userID string) ([]apiKeyWire, error)
- func (b *InMemoryBackend) ListAvailabilityDomains(compartment string) ([]adWire, error)
- func (b *InMemoryBackend) ListBulkEditTagsResourceTypes(o ListOpts) page.Page[bulkEditType]
- func (b *InMemoryBackend) ListCompartments(f CompartmentFilter, o ListOpts) (page.Page[compartmentWire], error)
- func (b *InMemoryBackend) ListCredentials(userID string, kind credKind) ([]credWire, error)
- func (b *InMemoryBackend) ListDynamicGroups(f NameFilter, o ListOpts) (page.Page[dynamicGroupWire], error)
- func (b *InMemoryBackend) ListFaultDomains(compartment, ad string) ([]fdWire, error)
- func (b *InMemoryBackend) ListGroups(f NameFilter, o ListOpts) (page.Page[Meta], error)
- func (b *InMemoryBackend) ListIdentityProviders(protocol string, f NameFilter, o ListOpts) (page.Page[IdentityProviderWire], error)
- func (b *InMemoryBackend) ListIdpGroupMappings(idpID string, o ListOpts) (page.Page[IdpGroupMappingWire], error)
- func (b *InMemoryBackend) ListMemberships(compartment, userID, groupID string, o ListOpts) (page.Page[membershipWire], error)
- func (b *InMemoryBackend) ListNetworkSources(f NameFilter, o ListOpts) (page.Page[NetworkSourceWire], error)
- func (b *InMemoryBackend) ListPolicies(f PolicyFilter, o ListOpts) (page.Page[policyWire], error)
- func (b *InMemoryBackend) ListRegionSubscriptions(id string) ([]regionSubWire, error)
- func (b *InMemoryBackend) ListTagDefaults(f TagDefaultFilter, o ListOpts) (page.Page[tagDefaultWire], error)
- func (b *InMemoryBackend) ListTagNamespaces(compartment, state string, subtree bool, o ListOpts) (page.Page[tagNamespaceWire], error)
- func (b *InMemoryBackend) ListTaggingWorkRequests(compartment, resourceID string, o ListOpts) (page.Page[WorkRequestWire], error)
- func (b *InMemoryBackend) ListTags(nsID, state string, o ListOpts) (page.Page[tagWire], error)
- func (b *InMemoryBackend) ListUsers(f NameFilter, o ListOpts) (page.Page[userWire], error)
- func (b *InMemoryBackend) ListWorkRequests(compartment, resourceID string, o ListOpts) (page.Page[WorkRequestWire], error)
- func (b *InMemoryBackend) MoveCompartment(id, target, ifMatch string) (string, error)
- func (b *InMemoryBackend) RecoverCompartment(id string) (compartmentWire, string, error)
- func (b *InMemoryBackend) RemoveUserFromGroup(id string) error
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) ResetUIPassword(userID string) (uiPasswordWire, string, error)
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) SetClock(now func() time.Time)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) Sweep()
- func (b *InMemoryBackend) TagDefinition(namespace, key string) (ocitags.Def, bool)
- func (b *InMemoryBackend) TaggingWorkRequestErrors(id string, o ListOpts) (page.Page[TaggingErrorWire], error)
- func (b *InMemoryBackend) TaggingWorkRequestLogs(id string, o ListOpts) (page.Page[TaggingWRLogWire], error)
- func (b *InMemoryBackend) UpdateAuthenticationPolicy(compartment, ifMatch string, in UpdateAuthPolicyIn) (AuthPolicyWire, string, error)
- func (b *InMemoryBackend) UpdateCompartment(id, ifMatch string, in UpdateCompartmentIn) (compartmentWire, string, error)
- func (b *InMemoryBackend) UpdateCredential(userID, id string, kind credKind, text string) (credWire, string, error)
- func (b *InMemoryBackend) UpdateDynamicGroup(id, ifMatch string, in UpdateDynamicGroupIn) (dynamicGroupWire, string, error)
- func (b *InMemoryBackend) UpdateGroup(id, ifMatch string, in UpdateGroupIn) (Meta, string, error)
- func (b *InMemoryBackend) UpdateIdentityProvider(id, ifMatch string, in UpdateIDPIn) (IdentityProviderWire, string, error)
- func (b *InMemoryBackend) UpdateIdpGroupMapping(idpID, id, ifMatch string, name, groupID *string) (IdpGroupMappingWire, string, error)
- func (b *InMemoryBackend) UpdateNetworkSource(id, ifMatch string, in UpdateNetworkSourceIn) (NetworkSourceWire, string, error)
- func (b *InMemoryBackend) UpdatePolicy(id, ifMatch string, in UpdatePolicyIn) (policyWire, string, error)
- func (b *InMemoryBackend) UpdateTag(nsID, name, ifMatch string, in UpdateTagIn) (tagWire, string, error)
- func (b *InMemoryBackend) UpdateTagDefault(id string, in UpdateTagDefaultIn) (tagDefaultWire, string, error)
- func (b *InMemoryBackend) UpdateTagNamespace(id, ifMatch string, in UpdateTagNamespaceIn) (tagNamespaceWire, string, error)
- func (b *InMemoryBackend) UpdateUser(id, ifMatch string, in UpdateUserIn) (userWire, string, error)
- func (b *InMemoryBackend) UploadAPIKey(userID, pemKey string) (apiKeyWire, string, error)
- func (b *InMemoryBackend) VerifyAuthToken(userName, token string) (string, bool)
- func (b *InMemoryBackend) VerifySMTPCredential(username, password string) (string, bool)
- func (b *InMemoryBackend) VerifyUIPassword(userName, password string) (string, bool)
- type Internal
- type ListOpts
- type Membership
- type Meta
- type NameFilter
- type NetworkPolicyWire
- type NetworkSource
- type NetworkSourceWire
- type PasswordPolicy
- type PasswordPolicyIn
- type Policy
- type PolicyFilter
- type Provider
- type RegionSubscription
- type Settings
- type TagDef
- type TagDefault
- type TagDefaultFilter
- type TagNamespace
- type TaggingErrorWire
- type TaggingWRLogWire
- type Tags
- type UpdateAuthPolicyIn
- type UpdateCompartmentIn
- type UpdateDynamicGroupIn
- type UpdateGroupIn
- type UpdateIDPIn
- type UpdateNetworkSourceIn
- type UpdatePolicyIn
- type UpdateTagDefaultIn
- type UpdateTagIn
- type UpdateTagNamespaceIn
- type UpdateUserIn
- type User
- type VirtualSource
- type WorkRequest
- type WorkRequestWire
Constants ¶
const ( // Region is the home region of the emulated tenancy. Region = "us-ashburn-1" // TenancyID is the OCID of the emulated tenancy; it is also the root compartment id. TenancyID = "ocid1.tenancy.oc1..aaaaaaaagopherstackemulatedtenancy000000000000000000000000" )
const DefaultPort = 8153
DefaultPort is the dedicated listener's default TCP port.
Variables ¶
var ErrGrammar = errors.New("syntax error")
ErrGrammar marks a policy statement or matching rule that violates the documented grammar.
var ErrNilAppContext = errors.New("ociidentity: nil app context")
ErrNilAppContext is returned when Init is called with a nil AppContext.
var ErrSnapshotNull = errors.New("ociidentity: null entry in snapshot")
ErrSnapshotNull is returned when a snapshot contains a null entry.
Functions ¶
func ValidateMatchingRule ¶
ValidateMatchingRule checks a dynamic group rule: `ANY|ALL {condition, ...}`.
func ValidateStatement ¶
ValidateStatement checks one policy statement against the documented grammar (Allow, Deny, Define, Endorse and Admit).
Types ¶
type APIError ¶
APIError is an OCI error response: HTTP status plus the `code` and `message` body fields.
type APIKey ¶
type APIKey struct {
TimeCreated time.Time `json:"timeCreated"`
Fingerprint string `json:"fingerprint"`
PEM string `json:"pem"`
}
APIKey is an uploaded RSA public key.
type AuthPolicy ¶
type AuthPolicy struct {
Etag string `json:"etag"`
NetworkSourceIDs []string `json:"networkSourceIds"`
Password PasswordPolicy `json:"passwordPolicy"`
}
AuthPolicy is the stored authentication policy.
type AuthPolicyWire ¶
type AuthPolicyWire struct {
CompartmentID string `json:"compartmentId"`
NetworkPolicy NetworkPolicyWire `json:"networkPolicy"`
PasswordPolicy PasswordPolicy `json:"passwordPolicy"`
}
AuthPolicyWire is the authentication policy wire shape.
type BulkEditOpIn ¶
type BulkEditOpIn struct {
DefinedTags map[string]map[string]any `json:"definedTags"`
OperationType string `json:"operationType"`
}
BulkEditOpIn is an operation in a BulkEditTags body.
type BulkEditResourceIn ¶
type BulkEditResourceIn struct {
Metadata map[string]string `json:"metadata"`
ID string `json:"id"`
ResourceType string `json:"resourceType"`
}
BulkEditResourceIn is a resource in a BulkEditTags body.
type BulkEditTagsIn ¶
type BulkEditTagsIn struct {
RetryToken string `json:"-"`
CompartmentID string `json:"compartmentId"`
Resources []BulkEditResourceIn `json:"resources"`
Operations []BulkEditOpIn `json:"bulkEditOperations"`
}
BulkEditTagsIn is the BulkEditTags request body.
type BulkError ¶
type BulkError struct {
At time.Time `json:"at"`
Code string `json:"code"`
Message string `json:"message"`
}
BulkError is one failed target.
type BulkJob ¶
type BulkJob struct {
Ops []BulkOp `json:"ops,omitempty"`
Targets []BulkTarget `json:"targets"`
Results []BulkResult `json:"results"`
Errors []BulkError `json:"errors"`
Applied bool `json:"applied"`
}
BulkJob is the persisted work of a bulk tag work request.
type BulkOp ¶
type BulkOp struct {
DefinedTags map[string]map[string]any `json:"definedTags"`
Type string `json:"type"`
}
BulkOp is one bulk edit operation.
type BulkResult ¶
type BulkResult struct {
ID string `json:"id"`
EntityType string `json:"entityType"`
Action string `json:"action"`
}
BulkResult is the outcome for one target.
type BulkTarget ¶
type BulkTarget struct {
Metadata map[string]string `json:"metadata,omitempty"`
ID string `json:"id"`
ResourceType string `json:"resourceType"`
}
BulkTarget is a resource a bulk work request acts on.
type Capabilities ¶
type Capabilities struct {
CanUseConsolePassword bool `json:"canUseConsolePassword"`
CanUseAPIKeys bool `json:"canUseApiKeys"`
CanUseAuthTokens bool `json:"canUseAuthTokens"`
CanUseSMTPCredentials bool `json:"canUseSmtpCredentials"`
CanUseCustomerSecretKeys bool `json:"canUseCustomerSecretKeys"`
CanUseOAuth2ClientCredentials bool `json:"canUseOAuth2ClientCredentials"`
CanUseDBCredentials bool `json:"canUseDbCredentials"`
}
Capabilities are the per-user credential switches.
type Compartment ¶
Compartment is a stored compartment.
type CompartmentFilter ¶
type CompartmentFilter struct {
CompartmentID string
AccessLevel string
Name string
State string
Subtree bool
}
CompartmentFilter holds the ListCompartments query.
type CompartmentUsage ¶
CompartmentUsage names a resource another service still holds in a compartment, or returns "".
type ConfigProvider ¶
type ConfigProvider interface {
GetOCIIdentitySettings() Settings
}
ConfigProvider extracts OCI Identity configuration from the AppContext Config.
type CreateCompartmentIn ¶
type CreateCompartmentIn struct {
RetryToken string `json:"-"`
Tags
CompartmentID string `json:"compartmentId"`
Name string `json:"name"`
Description string `json:"description"`
}
CreateCompartmentIn is the CreateCompartment request body.
type CreateDynamicGroupIn ¶
type CreateDynamicGroupIn struct {
RetryToken string `json:"-"`
Tags
CompartmentID string `json:"compartmentId"`
Name string `json:"name"`
Description string `json:"description"`
MatchingRule string `json:"matchingRule"`
}
CreateDynamicGroupIn is the CreateDynamicGroup request body.
type CreateGroupIn ¶
type CreateGroupIn struct {
RetryToken string `json:"-"`
Tags
CompartmentID string `json:"compartmentId"`
Name string `json:"name"`
Description string `json:"description"`
}
CreateGroupIn is the CreateGroup request body.
type CreateIDPIn ¶
type CreateIDPIn struct {
RetryToken string `json:"-"`
Tags
FreeformAttributes map[string]string `json:"freeformAttributes"`
Protocol string `json:"protocol"`
CompartmentID string `json:"compartmentId"`
Name string `json:"name"`
Description string `json:"description"`
ProductType string `json:"productType"`
MetadataURL string `json:"metadataUrl"`
Metadata string `json:"metadata"`
}
CreateIDPIn is the CreateIdentityProvider request body.
type CreateNetworkSourceIn ¶
type CreateNetworkSourceIn struct {
RetryToken string `json:"-"`
Tags
CompartmentID string `json:"compartmentId"`
Name string `json:"name"`
Description string `json:"description"`
PublicSourceList []string `json:"publicSourceList"`
VirtualSourceList []VirtualSource `json:"virtualSourceList"`
Services []string `json:"services"`
}
CreateNetworkSourceIn is the CreateNetworkSource request body.
type CreatePolicyIn ¶
type CreatePolicyIn struct {
RetryToken string `json:"-"`
Tags
VersionDate *string `json:"versionDate"`
CompartmentID string `json:"compartmentId"`
Name string `json:"name"`
Description string `json:"description"`
Statements []string `json:"statements"`
}
CreatePolicyIn is the CreatePolicy request body.
type CreateTagDefaultIn ¶
type CreateTagDefaultIn struct {
RetryToken string `json:"-"`
IsRequired *bool `json:"isRequired"`
CompartmentID string `json:"compartmentId"`
TagDefinitionID string `json:"tagDefinitionId"`
Value string `json:"value"`
}
CreateTagDefaultIn is the CreateTagDefault request body.
type CreateTagIn ¶
type CreateTagIn struct {
RetryToken string `json:"-"`
Validator map[string]any `json:"validator"`
IsCostTracking *bool `json:"isCostTracking"`
Tags
Name string `json:"name"`
Description string `json:"description"`
}
CreateTagIn is the CreateTag request body.
type CreateTagNamespaceIn ¶
type CreateTagNamespaceIn struct {
RetryToken string `json:"-"`
Tags
CompartmentID string `json:"compartmentId"`
Name string `json:"name"`
Description string `json:"description"`
}
CreateTagNamespaceIn is the CreateTagNamespace request body.
type CreateUserIn ¶
type CreateUserIn struct {
RetryToken string `json:"-"`
Tags
CompartmentID string `json:"compartmentId"`
Name string `json:"name"`
Description string `json:"description"`
Email string `json:"email"`
}
CreateUserIn is the CreateUser request body.
type Credential ¶
type Credential struct {
TimeCreated time.Time `json:"timeCreated"`
ID string `json:"id"`
Text string `json:"text"`
Username string `json:"username,omitempty"`
Salt string `json:"salt,omitempty"`
Digest string `json:"digest,omitempty"`
Secret string `json:"secret,omitempty"`
}
Credential is an auth token, secret key or SMTP credential. Only customer secret keys keep their secret (HMAC needs it); the others keep a salted digest.
type DynamicGroup ¶
type DynamicGroup struct {
Meta
MatchingRule string `json:"matchingRule"`
Internal Internal `json:"internal"`
}
DynamicGroup is a stored dynamic group.
type Handler ¶
type Handler struct {
Backend *InMemoryBackend
Port int
EnforceAuth bool
// contains filtered or unexported fields
}
Handler serves OCI Identity (IAM API 20160918): tenancy, compartments, principals, policies, credentials, tags.
func NewHandler ¶
func NewHandler(backend *InMemoryBackend) *Handler
NewHandler creates a Handler; callers override Port and EnforceAuth from Settings.
func (*Handler) ExtractOperation ¶
ExtractOperation returns the operation name for metrics.
func (*Handler) ExtractResource ¶
ExtractResource returns the addressed resource id for metrics.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations lists the supported operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler for all OCI Identity requests.
func (*Handler) MatchPriority ¶
MatchPriority is irrelevant because RouteMatcher never matches.
func (*Handler) RouteMatcher ¶
RouteMatcher never matches: OCI Identity runs on its own listener.
type IdentityProvider ¶
type IdentityProvider struct {
Meta
ProductType string `json:"productType"`
MetadataURL string `json:"metadataUrl"`
Metadata string `json:"metadata"`
SigningCertificate string `json:"signingCertificate"`
RedirectURL string `json:"redirectUrl"`
FreeformAttributes map[string]string `json:"freeformAttributes"`
Internal Internal `json:"internal"`
}
IdentityProvider is a stored SAML2 identity provider.
type IdentityProviderWire ¶
type IdentityProviderWire struct {
FreeformAttributes map[string]string `json:"freeformAttributes"`
Meta
Protocol string `json:"protocol"`
ProductType string `json:"productType"`
MetadataURL string `json:"metadataUrl"`
Metadata string `json:"metadata"`
SigningCertificate string `json:"signingCertificate"`
RedirectURL string `json:"redirectUrl"`
}
IdentityProviderWire is the SAML2 identity provider wire shape.
type IdpGroupMapping ¶
type IdpGroupMapping struct {
TimeCreated time.Time `json:"timeCreated"`
ID string `json:"id"`
IdpID string `json:"idpId"`
IdpGroupName string `json:"idpGroupName"`
GroupID string `json:"groupId"`
CompartmentID string `json:"compartmentId"`
Etag string `json:"etag"`
Seq int64 `json:"seq"`
}
IdpGroupMapping maps an identity provider group to an IAM group.
type IdpGroupMappingWire ¶
type IdpGroupMappingWire struct {
TimeCreated time.Time `json:"timeCreated"`
ID string `json:"id"`
IdpID string `json:"idpId"`
IdpGroupName string `json:"idpGroupName"`
GroupID string `json:"groupId"`
CompartmentID string `json:"compartmentId"`
LifecycleState string `json:"lifecycleState"`
}
IdpGroupMappingWire is the mapping wire shape.
type InMemoryBackend ¶
type InMemoryBackend struct {
// Auth is the API-key registry shared with the other OCI services.
Auth *ociauth.Registry
// contains filtered or unexported fields
}
InMemoryBackend holds all IAM state under one lock.
func NewInMemoryBackend ¶
func NewInMemoryBackend() *InMemoryBackend
NewInMemoryBackend creates an empty backend.
func (*InMemoryBackend) AddCompartmentUsage ¶
func (b *InMemoryBackend) AddCompartmentUsage(fn CompartmentUsage)
AddCompartmentUsage registers a service whose resources block compartment deletion.
func (*InMemoryBackend) AddUserToGroup ¶
func (b *InMemoryBackend) AddUserToGroup(userID, groupID string) (membershipWire, string, error)
AddUserToGroup creates a membership.
func (*InMemoryBackend) BulkDeleteTags ¶
func (b *InMemoryBackend) BulkDeleteTags(ids []string, token string) (string, error)
BulkDeleteTags accepts an asynchronous deletion of tag definitions.
func (*InMemoryBackend) BulkEditTags ¶
func (b *InMemoryBackend) BulkEditTags(in BulkEditTagsIn) (string, error)
BulkEditTags accepts an asynchronous edit of the defined tags of several resources.
func (*InMemoryBackend) CascadeDeleteTagNamespace ¶
func (b *InMemoryBackend) CascadeDeleteTagNamespace(id, ifMatch, token string) (string, error)
CascadeDeleteTagNamespace deletes a retired namespace together with every tag definition in it.
func (*InMemoryBackend) ChangeTagNamespaceCompartment ¶
func (b *InMemoryBackend) ChangeTagNamespaceCompartment(id, compartment, token string) error
ChangeTagNamespaceCompartment moves a tag namespace and its tag definitions to another compartment.
func (*InMemoryBackend) CompartmentActive ¶
func (b *InMemoryBackend) CompartmentActive(id string) bool
CompartmentActive reports whether id is the tenancy or an ACTIVE compartment.
func (*InMemoryBackend) CompartmentName ¶
func (b *InMemoryBackend) CompartmentName(id string) string
CompartmentName returns the name of the tenancy or a known compartment, empty when id is unknown.
func (*InMemoryBackend) CompartmentWithin ¶
func (b *InMemoryBackend) CompartmentWithin(id, ancestor string) bool
CompartmentWithin reports whether id equals ancestor or is nested below it; the tenancy contains everything.
func (*InMemoryBackend) CreateCompartment ¶
func (b *InMemoryBackend) CreateCompartment(in CreateCompartmentIn) (compartmentWire, string, error)
CreateCompartment creates a compartment under the tenancy or another compartment.
func (*InMemoryBackend) CreateDynamicGroup ¶
func (b *InMemoryBackend) CreateDynamicGroup(in CreateDynamicGroupIn) (dynamicGroupWire, string, error)
CreateDynamicGroup creates a dynamic group after validating its matching rule.
func (*InMemoryBackend) CreateGroup ¶
func (b *InMemoryBackend) CreateGroup(in CreateGroupIn) (Meta, string, error)
CreateGroup creates an IAM group.
func (*InMemoryBackend) CreateIdentityProvider ¶
func (b *InMemoryBackend) CreateIdentityProvider(in CreateIDPIn) (IdentityProviderWire, string, error)
CreateIdentityProvider creates a SAML2 identity provider from its metadata document.
func (*InMemoryBackend) CreateIdpGroupMapping ¶
func (b *InMemoryBackend) CreateIdpGroupMapping( idpID, group, groupID, token string, ) (IdpGroupMappingWire, string, error)
CreateIdpGroupMapping maps an identity provider group to an existing IAM group.
func (*InMemoryBackend) CreateNetworkSource ¶
func (b *InMemoryBackend) CreateNetworkSource(in CreateNetworkSourceIn) (NetworkSourceWire, string, error)
CreateNetworkSource creates a network source.
func (*InMemoryBackend) CreatePolicy ¶
func (b *InMemoryBackend) CreatePolicy(in CreatePolicyIn) (policyWire, string, error)
CreatePolicy creates a policy after validating every statement.
func (*InMemoryBackend) CreateRegionSubscription ¶
func (b *InMemoryBackend) CreateRegionSubscription(tenancy, key, token string) (regionSubWire, error)
CreateRegionSubscription subscribes the tenancy to another region; it is IN_PROGRESS for the transition window.
func (*InMemoryBackend) CreateTag ¶
func (b *InMemoryBackend) CreateTag(nsID string, in CreateTagIn) (tagWire, string, error)
CreateTag creates a tag definition in a namespace.
func (*InMemoryBackend) CreateTagDefault ¶
func (b *InMemoryBackend) CreateTagDefault(in CreateTagDefaultIn) (tagDefaultWire, string, error)
CreateTagDefault creates a default value for a tag in a compartment.
func (*InMemoryBackend) CreateTagNamespace ¶
func (b *InMemoryBackend) CreateTagNamespace(in CreateTagNamespaceIn) (tagNamespaceWire, string, error)
CreateTagNamespace creates a tag namespace.
func (*InMemoryBackend) CreateUser ¶
func (b *InMemoryBackend) CreateUser(in CreateUserIn) (userWire, string, error)
CreateUser creates an IAM user.
func (*InMemoryBackend) CustomerSecretKey ¶
func (b *InMemoryBackend) CustomerSecretKey(accessKey string) (string, string, bool)
CustomerSecretKey returns the owner and secret of a customer secret key by its access key id.
func (*InMemoryBackend) DeleteAPIKey ¶
func (b *InMemoryBackend) DeleteAPIKey(userID, fingerprint string) error
DeleteAPIKey removes a key and stops verifying signatures made with it.
func (*InMemoryBackend) DeleteCompartment ¶
func (b *InMemoryBackend) DeleteCompartment(id, ifMatch string) (string, error)
DeleteCompartment starts the asynchronous deletion of an empty compartment and returns the work request id.
func (*InMemoryBackend) DeleteCredential ¶
func (b *InMemoryBackend) DeleteCredential(userID, id string, kind credKind) error
DeleteCredential removes a credential.
func (*InMemoryBackend) DeleteDynamicGroup ¶
func (b *InMemoryBackend) DeleteDynamicGroup(id, ifMatch string) error
DeleteDynamicGroup removes a dynamic group.
func (*InMemoryBackend) DeleteGroup ¶
func (b *InMemoryBackend) DeleteGroup(id, ifMatch string) error
DeleteGroup removes an empty group.
func (*InMemoryBackend) DeleteIdentityProvider ¶
func (b *InMemoryBackend) DeleteIdentityProvider(id, ifMatch string) error
DeleteIdentityProvider deletes an identity provider and its group mappings.
func (*InMemoryBackend) DeleteIdpGroupMapping ¶
func (b *InMemoryBackend) DeleteIdpGroupMapping(idpID, id, ifMatch string) error
DeleteIdpGroupMapping deletes a mapping.
func (*InMemoryBackend) DeleteNetworkSource ¶
func (b *InMemoryBackend) DeleteNetworkSource(id, ifMatch string) error
DeleteNetworkSource deletes a network source the authentication policy does not reference.
func (*InMemoryBackend) DeletePolicy ¶
func (b *InMemoryBackend) DeletePolicy(id, ifMatch string) error
DeletePolicy removes a policy.
func (*InMemoryBackend) DeleteTag ¶
func (b *InMemoryBackend) DeleteTag(nsID, name, ifMatch string) (string, error)
DeleteTag starts the asynchronous deletion of a tag definition and its defaults.
func (*InMemoryBackend) DeleteTagDefault ¶
func (b *InMemoryBackend) DeleteTagDefault(id string) error
DeleteTagDefault removes a tag default.
func (*InMemoryBackend) DeleteTagNamespace ¶
func (b *InMemoryBackend) DeleteTagNamespace(id, ifMatch string) error
DeleteTagNamespace removes a namespace that holds no tag definitions.
func (*InMemoryBackend) DeleteUser ¶
func (b *InMemoryBackend) DeleteUser(id, ifMatch string) error
DeleteUser removes a user that belongs to no group, along with its credentials.
func (*InMemoryBackend) GetAuthenticationPolicy ¶
func (b *InMemoryBackend) GetAuthenticationPolicy(compartment string) (AuthPolicyWire, string, error)
GetAuthenticationPolicy returns the tenancy authentication policy.
func (*InMemoryBackend) GetCompartment ¶
func (b *InMemoryBackend) GetCompartment(id string) (compartmentWire, string, error)
GetCompartment returns one compartment (the tenancy id addresses the root compartment).
func (*InMemoryBackend) GetDynamicGroup ¶
func (b *InMemoryBackend) GetDynamicGroup(id string) (dynamicGroupWire, string, error)
GetDynamicGroup returns one dynamic group.
func (*InMemoryBackend) GetGroup ¶
func (b *InMemoryBackend) GetGroup(id string) (Meta, string, error)
GetGroup returns one group.
func (*InMemoryBackend) GetIdentityProvider ¶
func (b *InMemoryBackend) GetIdentityProvider(id string) (IdentityProviderWire, string, error)
GetIdentityProvider returns one identity provider.
func (*InMemoryBackend) GetIdpGroupMapping ¶
func (b *InMemoryBackend) GetIdpGroupMapping(idpID, id string) (IdpGroupMappingWire, string, error)
GetIdpGroupMapping returns one mapping.
func (*InMemoryBackend) GetMembership ¶
func (b *InMemoryBackend) GetMembership(id string) (membershipWire, error)
GetMembership returns one membership.
func (*InMemoryBackend) GetNetworkSource ¶
func (b *InMemoryBackend) GetNetworkSource(id string) (NetworkSourceWire, string, error)
GetNetworkSource returns one network source.
func (*InMemoryBackend) GetPolicy ¶
func (b *InMemoryBackend) GetPolicy(id string) (policyWire, string, error)
GetPolicy returns one policy.
func (*InMemoryBackend) GetTag ¶
func (b *InMemoryBackend) GetTag(nsID, name string) (tagWire, string, error)
GetTag returns one tag definition.
func (*InMemoryBackend) GetTagDefault ¶
func (b *InMemoryBackend) GetTagDefault(id string) (tagDefaultWire, error)
GetTagDefault returns one tag default.
func (*InMemoryBackend) GetTagNamespace ¶
func (b *InMemoryBackend) GetTagNamespace(id string) (tagNamespaceWire, string, error)
GetTagNamespace returns one namespace.
func (*InMemoryBackend) GetTaggingWorkRequest ¶
func (b *InMemoryBackend) GetTaggingWorkRequest(id string) (WorkRequestWire, error)
GetTaggingWorkRequest returns one tagging work request.
func (*InMemoryBackend) GetTenancy ¶
func (b *InMemoryBackend) GetTenancy(id string) (tenancyWire, error)
GetTenancy returns the emulated tenancy.
func (*InMemoryBackend) GetUIPasswordInfo ¶
func (b *InMemoryBackend) GetUIPasswordInfo(userID string) (uiPasswordWire, error)
GetUIPasswordInfo returns the console password metadata (never the password).
func (*InMemoryBackend) GetUser ¶
func (b *InMemoryBackend) GetUser(id string) (userWire, string, error)
GetUser returns one user.
func (*InMemoryBackend) GetWorkRequest ¶
func (b *InMemoryBackend) GetWorkRequest(id string) (WorkRequestWire, error)
GetWorkRequest returns one work request.
func (*InMemoryBackend) ListAPIKeys ¶
func (b *InMemoryBackend) ListAPIKeys(userID string) ([]apiKeyWire, error)
ListAPIKeys lists a user's API keys.
func (*InMemoryBackend) ListAvailabilityDomains ¶
func (b *InMemoryBackend) ListAvailabilityDomains(compartment string) ([]adWire, error)
ListAvailabilityDomains returns the region's availability domains.
func (*InMemoryBackend) ListBulkEditTagsResourceTypes ¶
func (b *InMemoryBackend) ListBulkEditTagsResourceTypes(o ListOpts) page.Page[bulkEditType]
ListBulkEditTagsResourceTypes lists the resource types BulkEditTags can edit here.
func (*InMemoryBackend) ListCompartments ¶
func (b *InMemoryBackend) ListCompartments(f CompartmentFilter, o ListOpts) (page.Page[compartmentWire], error)
ListCompartments lists the children (or the whole subtree) of a compartment.
func (*InMemoryBackend) ListCredentials ¶
func (b *InMemoryBackend) ListCredentials(userID string, kind credKind) ([]credWire, error)
ListCredentials lists a user's credentials of one kind, without secrets.
func (*InMemoryBackend) ListDynamicGroups ¶
func (b *InMemoryBackend) ListDynamicGroups(f NameFilter, o ListOpts) (page.Page[dynamicGroupWire], error)
ListDynamicGroups lists dynamic groups.
func (*InMemoryBackend) ListFaultDomains ¶
func (b *InMemoryBackend) ListFaultDomains(compartment, ad string) ([]fdWire, error)
ListFaultDomains returns the three fault domains of an availability domain.
func (*InMemoryBackend) ListGroups ¶
func (b *InMemoryBackend) ListGroups(f NameFilter, o ListOpts) (page.Page[Meta], error)
ListGroups lists groups.
func (*InMemoryBackend) ListIdentityProviders ¶
func (b *InMemoryBackend) ListIdentityProviders( protocol string, f NameFilter, o ListOpts, ) (page.Page[IdentityProviderWire], error)
ListIdentityProviders lists identity providers of a protocol.
func (*InMemoryBackend) ListIdpGroupMappings ¶
func (b *InMemoryBackend) ListIdpGroupMappings(idpID string, o ListOpts) (page.Page[IdpGroupMappingWire], error)
ListIdpGroupMappings lists the mappings of an identity provider in creation order.
func (*InMemoryBackend) ListMemberships ¶
func (b *InMemoryBackend) ListMemberships( compartment, userID, groupID string, o ListOpts, ) (page.Page[membershipWire], error)
ListMemberships lists memberships filtered by user and/or group.
func (*InMemoryBackend) ListNetworkSources ¶
func (b *InMemoryBackend) ListNetworkSources(f NameFilter, o ListOpts) (page.Page[NetworkSourceWire], error)
ListNetworkSources lists network sources.
func (*InMemoryBackend) ListPolicies ¶
func (b *InMemoryBackend) ListPolicies(f PolicyFilter, o ListOpts) (page.Page[policyWire], error)
ListPolicies lists the policies of one compartment.
func (*InMemoryBackend) ListRegionSubscriptions ¶
func (b *InMemoryBackend) ListRegionSubscriptions(id string) ([]regionSubWire, error)
ListRegionSubscriptions returns the single home-region subscription.
func (*InMemoryBackend) ListTagDefaults ¶
func (b *InMemoryBackend) ListTagDefaults(f TagDefaultFilter, o ListOpts) (page.Page[tagDefaultWire], error)
ListTagDefaults lists tag defaults filtered by id, compartment or tag.
func (*InMemoryBackend) ListTagNamespaces ¶
func (b *InMemoryBackend) ListTagNamespaces( compartment, state string, subtree bool, o ListOpts, ) (page.Page[tagNamespaceWire], error)
ListTagNamespaces lists the namespaces of a compartment.
func (*InMemoryBackend) ListTaggingWorkRequests ¶
func (b *InMemoryBackend) ListTaggingWorkRequests( compartment, resourceID string, o ListOpts, ) (page.Page[WorkRequestWire], error)
ListTaggingWorkRequests lists the tagging work requests of a compartment, optionally for one resource.
func (*InMemoryBackend) ListUsers ¶
func (b *InMemoryBackend) ListUsers(f NameFilter, o ListOpts) (page.Page[userWire], error)
ListUsers lists users.
func (*InMemoryBackend) ListWorkRequests ¶
func (b *InMemoryBackend) ListWorkRequests( compartment, resourceID string, o ListOpts, ) (page.Page[WorkRequestWire], error)
ListWorkRequests lists the work requests of a compartment, optionally for one resource.
func (*InMemoryBackend) MoveCompartment ¶
func (b *InMemoryBackend) MoveCompartment(id, target, ifMatch string) (string, error)
MoveCompartment re-parents a compartment tree and returns the work request id.
func (*InMemoryBackend) RecoverCompartment ¶
func (b *InMemoryBackend) RecoverCompartment(id string) (compartmentWire, string, error)
RecoverCompartment restores a DELETED compartment to ACTIVE.
func (*InMemoryBackend) RemoveUserFromGroup ¶
func (b *InMemoryBackend) RemoveUserFromGroup(id string) error
RemoveUserFromGroup deletes a membership.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all state and the registered API keys.
func (*InMemoryBackend) ResetUIPassword ¶
func (b *InMemoryBackend) ResetUIPassword(userID string) (uiPasswordWire, string, error)
ResetUIPassword generates a console password; it is returned only here.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a snapshot.
func (*InMemoryBackend) SetClock ¶
func (b *InMemoryBackend) SetClock(now func() time.Time)
SetClock injects the time source used for lifecycle transitions.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state, including registered API keys.
func (*InMemoryBackend) Sweep ¶
func (b *InMemoryBackend) Sweep()
Sweep applies due lifecycle transitions.
func (*InMemoryBackend) TagDefinition ¶
func (b *InMemoryBackend) TagDefinition(namespace, key string) (ocitags.Def, bool)
TagDefinition resolves a defined tag namespace and key (both case-insensitive) for tag validation in other services.
func (*InMemoryBackend) TaggingWorkRequestErrors ¶
func (b *InMemoryBackend) TaggingWorkRequestErrors(id string, o ListOpts) (page.Page[TaggingErrorWire], error)
TaggingWorkRequestErrors lists the errors of a finished tagging work request.
func (*InMemoryBackend) TaggingWorkRequestLogs ¶
func (b *InMemoryBackend) TaggingWorkRequestLogs(id string, o ListOpts) (page.Page[TaggingWRLogWire], error)
TaggingWorkRequestLogs lists the log lines of a tagging work request.
func (*InMemoryBackend) UpdateAuthenticationPolicy ¶
func (b *InMemoryBackend) UpdateAuthenticationPolicy( compartment, ifMatch string, in UpdateAuthPolicyIn, ) (AuthPolicyWire, string, error)
UpdateAuthenticationPolicy updates the password policy and the network sources of the network policy.
func (*InMemoryBackend) UpdateCompartment ¶
func (b *InMemoryBackend) UpdateCompartment( id, ifMatch string, in UpdateCompartmentIn, ) (compartmentWire, string, error)
UpdateCompartment changes name, description and tags.
func (*InMemoryBackend) UpdateCredential ¶
func (b *InMemoryBackend) UpdateCredential(userID, id string, kind credKind, text string) (credWire, string, error)
UpdateCredential changes the description or display name.
func (*InMemoryBackend) UpdateDynamicGroup ¶
func (b *InMemoryBackend) UpdateDynamicGroup( id, ifMatch string, in UpdateDynamicGroupIn, ) (dynamicGroupWire, string, error)
UpdateDynamicGroup changes description, matching rule and tags.
func (*InMemoryBackend) UpdateGroup ¶
func (b *InMemoryBackend) UpdateGroup(id, ifMatch string, in UpdateGroupIn) (Meta, string, error)
UpdateGroup changes description and tags.
func (*InMemoryBackend) UpdateIdentityProvider ¶
func (b *InMemoryBackend) UpdateIdentityProvider( id, ifMatch string, in UpdateIDPIn, ) (IdentityProviderWire, string, error)
UpdateIdentityProvider changes the description, metadata, attributes and tags.
func (*InMemoryBackend) UpdateIdpGroupMapping ¶
func (b *InMemoryBackend) UpdateIdpGroupMapping( idpID, id, ifMatch string, name, groupID *string, ) (IdpGroupMappingWire, string, error)
UpdateIdpGroupMapping changes the IDP group name or the IAM group of a mapping.
func (*InMemoryBackend) UpdateNetworkSource ¶
func (b *InMemoryBackend) UpdateNetworkSource( id, ifMatch string, in UpdateNetworkSourceIn, ) (NetworkSourceWire, string, error)
UpdateNetworkSource changes the description, source lists, services and tags.
func (*InMemoryBackend) UpdatePolicy ¶
func (b *InMemoryBackend) UpdatePolicy(id, ifMatch string, in UpdatePolicyIn) (policyWire, string, error)
UpdatePolicy changes description, statements, versionDate and tags.
func (*InMemoryBackend) UpdateTag ¶
func (b *InMemoryBackend) UpdateTag(nsID, name, ifMatch string, in UpdateTagIn) (tagWire, string, error)
UpdateTag changes a tag definition.
func (*InMemoryBackend) UpdateTagDefault ¶
func (b *InMemoryBackend) UpdateTagDefault(id string, in UpdateTagDefaultIn) (tagDefaultWire, string, error)
UpdateTagDefault changes the value or requirement of a tag default.
func (*InMemoryBackend) UpdateTagNamespace ¶
func (b *InMemoryBackend) UpdateTagNamespace( id, ifMatch string, in UpdateTagNamespaceIn, ) (tagNamespaceWire, string, error)
UpdateTagNamespace changes description, retirement and tags.
func (*InMemoryBackend) UpdateUser ¶
func (b *InMemoryBackend) UpdateUser(id, ifMatch string, in UpdateUserIn) (userWire, string, error)
UpdateUser changes description, email and tags.
func (*InMemoryBackend) UploadAPIKey ¶
func (b *InMemoryBackend) UploadAPIKey(userID, pemKey string) (apiKeyWire, string, error)
UploadAPIKey registers an RSA public key for a user and with the shared signature registry.
func (*InMemoryBackend) VerifyAuthToken ¶
func (b *InMemoryBackend) VerifyAuthToken(userName, token string) (string, bool)
VerifyAuthToken reports whether token is a current auth token of the active user with the given name, and returns that user's OCID. Identity keeps only a salted PBKDF2 digest of each token; tokens created before digests were stored have none and never verify. Every call costs at least one derivation so response time does not reveal whether the user exists.
func (*InMemoryBackend) VerifySMTPCredential ¶
func (b *InMemoryBackend) VerifySMTPCredential(username, password string) (string, bool)
VerifySMTPCredential reports whether username and password are a current SMTP credential, and returns its user.
func (*InMemoryBackend) VerifyUIPassword ¶
func (b *InMemoryBackend) VerifyUIPassword(userName, password string) (string, bool)
VerifyUIPassword reports whether password is the current console password of the active user with that name.
type Internal ¶
type Internal struct {
TransitionAt *time.Time `json:"transitionAt,omitempty"`
TimeDeleted *time.Time `json:"timeDeleted,omitempty"`
Etag string `json:"etag"`
Seq int64 `json:"seq"`
}
Internal is bookkeeping that never reaches the wire.
type Membership ¶
type Membership struct {
TimeCreated time.Time `json:"timeCreated"`
ID string `json:"id"`
CompartmentID string `json:"compartmentId"`
GroupID string `json:"groupId"`
UserID string `json:"userId"`
Seq int64 `json:"seq"`
}
Membership links a user to a group.
type Meta ¶
type Meta struct {
TimeCreated time.Time `json:"timeCreated"`
Tags
ID string `json:"id"`
CompartmentID string `json:"compartmentId"`
Name string `json:"name"`
Description string `json:"description"`
LifecycleState string `json:"lifecycleState"`
}
Meta is the field set common to compartments, users, groups, dynamic groups and policies.
type NameFilter ¶
NameFilter holds the common list filters of tenancy-level resources.
type NetworkPolicyWire ¶
type NetworkPolicyWire struct {
NetworkSourceIDs []string `json:"networkSourceIds"`
}
NetworkPolicyWire is the network policy wire shape.
type NetworkSource ¶
type NetworkSource struct {
Meta
PublicSourceList []string `json:"publicSourceList"`
VirtualSourceList []VirtualSource `json:"virtualSourceList"`
Services []string `json:"services"`
Internal Internal `json:"internal"`
}
NetworkSource is a stored network source.
type NetworkSourceWire ¶
type NetworkSourceWire struct {
Meta
PublicSourceList []string `json:"publicSourceList"`
VirtualSourceList []VirtualSource `json:"virtualSourceList"`
Services []string `json:"services"`
}
NetworkSourceWire is the network source wire shape.
type PasswordPolicy ¶
type PasswordPolicy struct {
MinimumPasswordLength int `json:"minimumPasswordLength"`
IsUppercaseCharactersRequired bool `json:"isUppercaseCharactersRequired"`
IsLowercaseCharactersRequired bool `json:"isLowercaseCharactersRequired"`
IsNumericCharactersRequired bool `json:"isNumericCharactersRequired"`
IsSpecialCharactersRequired bool `json:"isSpecialCharactersRequired"`
IsUsernameContainmentAllowed bool `json:"isUsernameContainmentAllowed"`
}
PasswordPolicy is the tenancy password policy.
type PasswordPolicyIn ¶
type PasswordPolicyIn struct {
MinimumPasswordLength *int `json:"minimumPasswordLength"`
IsUppercaseCharactersRequired *bool `json:"isUppercaseCharactersRequired"`
IsLowercaseCharactersRequired *bool `json:"isLowercaseCharactersRequired"`
IsNumericCharactersRequired *bool `json:"isNumericCharactersRequired"`
IsSpecialCharactersRequired *bool `json:"isSpecialCharactersRequired"`
IsUsernameContainmentAllowed *bool `json:"isUsernameContainmentAllowed"`
}
PasswordPolicyIn is a partial password policy update.
type Policy ¶
type Policy struct {
Meta
VersionDate string `json:"versionDate,omitempty"`
Statements []string `json:"statements"`
Internal Internal `json:"internal"`
}
Policy is a stored IAM policy.
type PolicyFilter ¶
PolicyFilter holds the ListPolicies query.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for OCI Identity. It runs on its own listener (see Handler.StartWorker) and never matches on the shared AWS router.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init creates the backend and handler; the port is bound in StartWorker.
type RegionSubscription ¶
type RegionSubscription struct {
SubscribedAt time.Time `json:"subscribedAt"`
Key string `json:"key"`
}
RegionSubscription is a tenancy subscription to an extra region.
type Settings ¶
type Settings struct {
Port int `` //nolint:lll // config struct tags are intentionally verbose
/* 190-byte string literal not displayed */
EnforceAuth bool `` //nolint:lll // config struct tags are intentionally verbose
/* 224-byte string literal not displayed */
}
Settings holds service-level configuration, embedded in the root CLI command as CLI.OCIIdentity.
func DefaultSettings ¶
func DefaultSettings() Settings
DefaultSettings returns the settings used when no ConfigProvider is available.
type TagDef ¶
type TagDef struct {
Meta
NamespaceID string `json:"namespaceId"`
NamespaceName string `json:"namespaceName"`
Validator map[string]any `json:"validator,omitempty"`
Internal Internal `json:"internal"`
IsRetired bool `json:"isRetired"`
IsCostTrack bool `json:"isCostTracking"`
}
TagDef is a stored tag definition.
type TagDefault ¶
type TagDefault struct {
TimeCreated time.Time `json:"timeCreated"`
ID string `json:"id"`
CompartmentID string `json:"compartmentId"`
NamespaceID string `json:"namespaceId"`
TagID string `json:"tagId"`
TagName string `json:"tagName"`
Value string `json:"value"`
Seq int64 `json:"seq"`
IsRequired bool `json:"isRequired"`
}
TagDefault is a stored tag default.
type TagDefaultFilter ¶
type TagDefaultFilter struct {
ID, CompartmentID, TagDefinitionID, State string
}
TagDefaultFilter holds the ListTagDefaults query.
type TagNamespace ¶
type TagNamespace struct {
Meta
Internal Internal `json:"internal"`
IsRetired bool `json:"isRetired"`
}
TagNamespace is a stored tag namespace.
type TaggingErrorWire ¶
type TaggingErrorWire struct {
Timestamp time.Time `json:"timestamp"`
Code string `json:"code"`
Message string `json:"message"`
}
TaggingErrorWire is the tagging work request error wire shape.
type TaggingWRLogWire ¶
type TaggingWRLogWire struct {
Timestamp time.Time `json:"timestamp"`
Message string `json:"message"`
}
TaggingWRLogWire is the tagging work request log wire shape.
type Tags ¶
type Tags struct {
FreeformTags map[string]string `json:"freeformTags"`
DefinedTags map[string]map[string]any `json:"definedTags"`
}
Tags carries the freeform and defined tags every taggable resource has.
type UpdateAuthPolicyIn ¶
type UpdateAuthPolicyIn struct {
PasswordPolicy *PasswordPolicyIn `json:"passwordPolicy"`
NetworkPolicy *NetworkPolicyWire `json:"networkPolicy"`
}
UpdateAuthPolicyIn is the UpdateAuthenticationPolicy request body.
type UpdateCompartmentIn ¶
type UpdateCompartmentIn struct {
Name *string `json:"name"`
Description *string `json:"description"`
Tags
}
UpdateCompartmentIn is the UpdateCompartment request body.
type UpdateDynamicGroupIn ¶
type UpdateDynamicGroupIn struct {
Description *string `json:"description"`
MatchingRule *string `json:"matchingRule"`
Tags
}
UpdateDynamicGroupIn is the UpdateDynamicGroup request body.
type UpdateGroupIn ¶
UpdateGroupIn is the UpdateGroup request body.
type UpdateIDPIn ¶
type UpdateIDPIn struct {
Tags
Description *string `json:"description"`
MetadataURL *string `json:"metadataUrl"`
Metadata *string `json:"metadata"`
FreeformAttributes map[string]string `json:"freeformAttributes"`
Protocol string `json:"protocol"`
}
UpdateIDPIn is the UpdateIdentityProvider request body.
type UpdateNetworkSourceIn ¶
type UpdateNetworkSourceIn struct {
Tags
Description *string `json:"description"`
PublicSourceList []string `json:"publicSourceList"`
VirtualSourceList []VirtualSource `json:"virtualSourceList"`
Services []string `json:"services"`
}
UpdateNetworkSourceIn is the UpdateNetworkSource request body.
type UpdatePolicyIn ¶
type UpdatePolicyIn struct {
Tags
Description *string `json:"description"`
VersionDate *string `json:"versionDate"`
Statements []string `json:"statements"`
}
UpdatePolicyIn is the UpdatePolicy request body.
type UpdateTagDefaultIn ¶
UpdateTagDefaultIn is the UpdateTagDefault request body.
type UpdateTagIn ¶
type UpdateTagIn struct {
Description *string `json:"description"`
IsRetired *bool `json:"isRetired"`
IsCostTracking *bool `json:"isCostTracking"`
Validator map[string]any `json:"validator"`
Tags
}
UpdateTagIn is the UpdateTag request body.
type UpdateTagNamespaceIn ¶
type UpdateTagNamespaceIn struct {
Description *string `json:"description"`
IsRetired *bool `json:"isRetired"`
Tags
}
UpdateTagNamespaceIn is the UpdateTagNamespace request body.
type UpdateUserIn ¶
type UpdateUserIn struct {
Description *string `json:"description"`
Email *string `json:"email"`
DBUserName *string `json:"dbUserName"`
Tags
}
UpdateUserIn is the UpdateUser request body.
type User ¶
type User struct {
UIPasswordCreated *time.Time `json:"uiPasswordCreated,omitempty"`
Meta
Email string `json:"email,omitempty"`
DBUserName string `json:"dbUserName,omitempty"`
UIPasswordSalt string `json:"uiPasswordSalt,omitempty"`
UIPasswordDigest string `json:"uiPasswordDigest,omitempty"`
Internal Internal `json:"internal"`
APIKeys []APIKey `json:"apiKeys"`
AuthTokens []Credential `json:"authTokens"`
SecretKeys []Credential `json:"secretKeys"`
SMTP []Credential `json:"smtp"`
Capabilities Capabilities `json:"capabilities"`
}
User is a stored IAM user with its credentials.
type VirtualSource ¶
VirtualSource is a VCN and the IP ranges allowed from it.
type WorkRequest ¶
type WorkRequest struct {
Accepted time.Time `json:"accepted"`
FinishAt time.Time `json:"finishAt"`
ID string `json:"id"`
Operation string `json:"operation"`
CompartmentID string `json:"compartmentId"`
EntityType string `json:"entityType"`
EntityID string `json:"entityId"`
Action string `json:"action"`
Bulk *BulkJob `json:"bulk,omitempty"`
FailedAt time.Time `json:"failedAt,omitzero"`
FailCode string `json:"failCode,omitempty"`
FailMessage string `json:"failMessage,omitempty"`
Seq int64 `json:"seq"`
}
WorkRequest tracks an asynchronous compartment or tag operation.
type WorkRequestWire ¶
type WorkRequestWire struct {
TimeAccepted time.Time `json:"timeAccepted"`
TimeStarted *time.Time `json:"timeStarted,omitempty"`
TimeFinished *time.Time `json:"timeFinished,omitempty"`
OperationType string `json:"operationType"`
Status string `json:"status"`
ID string `json:"id"`
CompartmentID string `json:"compartmentId"`
Resources []wrResourceWire `json:"resources"`
Errors []wrErrorWire `json:"errors"`
PercentComplete float32 `json:"percentComplete"`
}
WorkRequestWire is the work request wire shape.