This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package authority
|
||||
|
||||
import "git.cin.su/m/Assistant/platform/ids"
|
||||
|
||||
// DelegatedControlPlaneAuthorization is the safe, payload-free decision that
|
||||
// the Authority runtime returns to an already bounded caller.
|
||||
type DelegatedControlPlaneAuthorization struct {
|
||||
AuditID ids.ID
|
||||
}
|
||||
|
||||
type DelegatedControlPlaneCompletion struct {
|
||||
Request DelegatedControlPlaneRequest
|
||||
Outcome string
|
||||
}
|
||||
@@ -13,6 +13,73 @@ type GrantClass string
|
||||
|
||||
const GrantClassCreator GrantClass = "CREATOR"
|
||||
|
||||
// DelegatedControlPlaneOperation is deliberately a closed, semantic operation
|
||||
// set. A service credential cannot turn into arbitrary control-plane access.
|
||||
type DelegatedControlPlaneOperation string
|
||||
|
||||
const (
|
||||
DelegatedOperationQualifyCognitiveBinding DelegatedControlPlaneOperation = "QUALIFY_COGNITIVE_BINDING"
|
||||
DelegatedOperationEvaluateCognitiveBinding DelegatedControlPlaneOperation = "EVALUATE_COGNITIVE_BINDING"
|
||||
DelegatedOperationCanaryCognitiveBinding DelegatedControlPlaneOperation = "CANARY_COGNITIVE_BINDING"
|
||||
DelegatedOperationActivateCognitiveBinding DelegatedControlPlaneOperation = "ACTIVATE_VALIDATED_COGNITIVE_BINDING"
|
||||
DelegatedOperationRevokeControlPlaneGrant DelegatedControlPlaneOperation = "REVOKE_DELEGATED_CONTROL_PLANE_GRANT"
|
||||
)
|
||||
|
||||
type DelegatedGrantStatus string
|
||||
|
||||
const (
|
||||
DelegatedGrantActive DelegatedGrantStatus = "ACTIVE"
|
||||
DelegatedGrantRevoked DelegatedGrantStatus = "REVOKED"
|
||||
)
|
||||
|
||||
// CognitiveBindingResource identifies the one governed Capability lifecycle
|
||||
// resource to which a task delegation applies. It is intentionally not a
|
||||
// general-purpose resource selector.
|
||||
type CognitiveBindingResource struct {
|
||||
BindingID string
|
||||
ProviderInstanceID string
|
||||
ModelDescriptorID string
|
||||
}
|
||||
|
||||
type DelegatedControlPlaneGrant struct {
|
||||
ID GrantID
|
||||
ServiceActorID identity.ActorID
|
||||
ServicePrincipalID identity.PrincipalID
|
||||
IssuerPrincipalID identity.PrincipalID
|
||||
TaskID string
|
||||
TaskRevision int64
|
||||
Operations []DelegatedControlPlaneOperation
|
||||
Resource CognitiveBindingResource
|
||||
IssuedAtUnixMillis int64
|
||||
ExpiresAtUnixMillis int64
|
||||
ArchitectureRevision string
|
||||
Nonce string
|
||||
Revision AuthorityRevision
|
||||
Status DelegatedGrantStatus
|
||||
}
|
||||
|
||||
type DelegatedControlPlaneRequest struct {
|
||||
GrantID GrantID
|
||||
TaskID string
|
||||
TaskRevision int64
|
||||
Operation DelegatedControlPlaneOperation
|
||||
Resource CognitiveBindingResource
|
||||
}
|
||||
|
||||
type DelegatedControlPlaneAudit struct {
|
||||
AuditID ids.ID
|
||||
GrantID GrantID
|
||||
ServiceActorID identity.ActorID
|
||||
ServicePrincipalID identity.PrincipalID
|
||||
TaskID string
|
||||
TaskRevision int64
|
||||
Operation DelegatedControlPlaneOperation
|
||||
Resource CognitiveBindingResource
|
||||
Decision string
|
||||
Outcome string
|
||||
RecordedAtUnixMillis int64
|
||||
}
|
||||
|
||||
type Scope struct {
|
||||
ID ScopeID
|
||||
Global bool
|
||||
|
||||
@@ -8,8 +8,9 @@ type CredentialRef string
|
||||
type SecretPurpose string
|
||||
|
||||
const (
|
||||
SecretPurposeDatabasePassword SecretPurpose = "DATABASE_PASSWORD"
|
||||
SecretPurposeProviderAPIKey SecretPurpose = "PROVIDER_API_KEY"
|
||||
SecretPurposeDatabasePassword SecretPurpose = "DATABASE_PASSWORD"
|
||||
SecretPurposeProviderAPIKey SecretPurpose = "PROVIDER_API_KEY"
|
||||
SecretPurposeServiceAuthentication SecretPurpose = "SERVICE_AUTHENTICATION"
|
||||
)
|
||||
|
||||
// RuntimeConsumer identifies a trusted runtime allowed to resolve a credential.
|
||||
@@ -17,6 +18,7 @@ type RuntimeConsumer string
|
||||
|
||||
const (
|
||||
RuntimeConsumerCore RuntimeConsumer = "core-runtime"
|
||||
RuntimeConsumerCommit RuntimeConsumer = "commit-runtime"
|
||||
RuntimeConsumerWorkWorker RuntimeConsumer = "agent-worker"
|
||||
RuntimeConsumerEpistemicsWorker RuntimeConsumer = "reflection-worker"
|
||||
RuntimeConsumerCognitive RuntimeConsumer = "cognitive-worker"
|
||||
|
||||
Reference in New Issue
Block a user