Documentation
¶
Index ¶
Constants ¶
View Source
const ( APIName = "CMK" KMS = "KMS" BasePath = "/cmk/v1/{tenant}" )
View Source
const ( DefaultKeyStore = "DEFAULT_KEYSTORE" HYOKKeyStore = "HYOK_KEYSTORE" )
View Source
const ( DefaultTop = 20 DefaultSkip = 0 )
View Source
const ( QueryMaxLengthSystem = 50 QueryMaxLengthName = 255 )
View Source
const ( //nolint:gosec AuthTypeSecret = "AUTH_TYPE_SECRET" AuthTypeCertificate = "AUTH_TYPE_CERTIFICATE" TenantAdminGroup string = "TenantAdministrator" TenantAuditorGroup string = "TenantAuditor" KeyAdminRole BusinessRole = "KEY_ADMINISTRATOR" TenantAdminRole BusinessRole = "TENANT_ADMINISTRATOR" TenantAuditorRole BusinessRole = "TENANT_AUDITOR" InternalRequestingHandlingRole InternalRole = "INTERNAL_REQUEST_HANDLING" InternalBusinessAuthzRole InternalRole = "INTERNAL_BUSINESS_AUTH" InternalTenantProvisioningRole InternalRole = "INTERNAL_TENANT_PROVISIONING" InternalTenantCLIRole InternalRole = "INTERNAL_TENANT_CLI" InternalEventReconcilerRole InternalRole = "INTERNAL_EVENT_RECONCILER" InternalTaskProcessingRole InternalRole = "INTERNAL_TASK_PROCESSING" InternalTaskCertRotationRole InternalRole = "INTERNAL_TASK_CERT_ROTATION" InternalTaskWorkflowApproversRole InternalRole = "INTERNAL_TASK_WORKFLOW_APPROVERS" InternalTaskWorkflowCleanupRole InternalRole = "INTERNAL_TASK_WORKFLOW_CLEANUP" InternalTaskWorkflowExpirationRole InternalRole = "INTERNAL_TASK_WORKFLOW_EXPIRATION" InternalTaskHYOKSyncRole InternalRole = "INTERNAL_TASK_HYOK_SYNC" InternalTaskPendingStateSyncRole InternalRole = "INTERNAL_TASK_PENDING_STATE_SYNC" InternalTaskKeystorePoolRole InternalRole = "INTERNAL_TASK_KEYSTORE_POOL" InternalTaskSystemRefreshRole InternalRole = "INTERNAL_TASK_SYSTEM_REFRESH" InternalTaskTenantRefreshRole InternalRole = "INTERNAL_TASK_TENANT_REFRESH" InternalTaskSendNotificationRole InternalRole = "INTERNAL_TASK_SEND_NOTIFICATION" AuditorPolicy PolicyID = "AuditorPolicy" KeyAdminPolicy PolicyID = "KeyAdminPolicy" TenantAdminPolicy PolicyID = "TenantAdminPolicy" InternalTenantCLIPolicy PolicyID = "InternalTenantCLI" InternalBusinessAuthzPolicy PolicyID = "InternalBusinessAuthz" InternalEventReconcilerPolicy PolicyID = "InternalEventReconciler" InternalTenantProvisioningPolicy PolicyID = "InternalTenantProvisioning" InternalTaskProcessingPolicy PolicyID = "InternalTaskProcessing" InternalTaskCertRotationPolicy PolicyID = "InternalTaskCertRotation" InternalTaskWorkflowApproversPolicy PolicyID = "InternalTaskWorkflowApprovers" InternalTaskHYOKSyncPolicy PolicyID = "InternalTaskHYOKSync" InternalTaskPendingStateSyncPolicy PolicyID = "InternalTaskPendingStateSync" InternalTaskKeystorePoolPolicy PolicyID = "InternalTaskKeystorePool" InternalTaskSystemRefreshPolicy PolicyID = "InternalTaskSystemRefresh" InternalTaskTenantRefreshPolicy PolicyID = "InternalTaskTenantRefresh" InternalTaskWorkflowCleanupPolicy PolicyID = "InternalTaskWorkflowCleanup" InternalTaskWorkflowExpirationPolicy PolicyID = "InternalTaskWorkflowExpiration" )
View Source
const ( UserType userTypeKey = "UserType" BusinessUser UserTypeValue = "Business" InternalUser UserTypeValue = "Internal" InternalUserData internalUserDataKey = "InternalData" BusinessUserData businessUserDataKey = "ClientData" )
View Source
const ( DefaultConfigPath1 = "/etc/cmk" DefaultConfigPath2 = "$HOME/.cmk" )
View Source
const ( DefaultErrorCode = "UNKNOWN" DefaultErrorMessage = "Unknown" )
View Source
const ( KeyActionSetPrimary = "SET_PRIMARY_KEY" SystemActionDecommission = "SYSTEM_DECOMMISSION" // KeyTypeBYOK mirrors cmkapi.KeyType BYOK, defined here to avoid import cycles. KeyTypeBYOK = "BYOK" // KeyTypeHYOK mirrors cmkapi.KeyType HYOK, defined here to avoid import cycles. KeyTypeHYOK = "HYOK" // KeyTypeSystemManaged mirrors cmkapi.KeyType SYSTEM_MANAGED, defined here to avoid import cycles. KeyTypeSystemManaged = "SYSTEM_MANAGED" )
View Source
const ( CertificateTable = "certificates" EventTable = "events" GroupTable = "groups" ImportparamTable = "import_params" KeyTable = "keys" KeyconfigurationTable = "key_configurations" KeystoreTable = publicTablePreFix + "keystore_pool" KeyVersionTable = "key_versions" KeyLabelTable = "key_labels" SystemTable = "systems" SystemGroupTable = "system_groups" SystemPropertyTable = "systems_properties" TagTable = "tags" TenantTable = publicTablePreFix + "tenants" TenantconfigTable = "tenant_configs" WorkflowTable = "workflows" WorkflowTaskTable = "workflow_tasks" WorkflowTaskViewTable = "workflow_task_view" )
View Source
const ( WorkflowConfigKey = "WORKFLOW_CONFIG" DefaultMinimumApprovalCount = 2 MaxMinimumApprovals = 5 MinRetentionPeriodDays = 7 DefaultRetentionPeriodDays = 30 MaxRetentionPeriodDays = 30 DefaultExpiryPeriodDays = 7 DefaultMaxExpiryPeriodDays = 7 )
Workflow configuration bounds are security requirements, not operational preferences. Each limit represents the minimum acceptable security posture for a workflow-protected key management system:
- MinimumApprovals must be at least 2 to enforce dual control; at most 5 to remain operationally viable.
- RetentionPeriodDays must be at least 7 so completed and revoked workflows remain auditable; at most 30 to bound storage growth.
- MaxExpiryPeriodDays is capped at 7 to prevent workflows from remaining open indefinitely.
These values are enforced at three independent layers (OpenAPI schema, manager validation, and database CHECK constraints) and are covered by security tests. Do not widen these bounds without a security review.
View Source
const (
DBDriver = "pgx"
)
View Source
const UnknownUserName = "UNKNOWN"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BusinessRole ¶ added in v0.9.0
type BusinessRole string
type InternalRole ¶ added in v0.9.0
type InternalRole string
type UserTypeValue ¶ added in v0.9.0
type UserTypeValue string
Click to show internal directories.
Click to hide internal directories.