Documentation ¶
Overview ¶
Package primitive contains definitions of the primitive types used in ag.
Index ¶
- Constants
- type Claim
- type Credential
- type CredentialValue
- type Environment
- type Keyring
- type KeyringMember
- type KeyringMemberKey
- type Membership
- type Org
- type OrgInvite
- type Policy
- type PolicyAttachment
- type PolicyStatement
- type PrivateKey
- type PrivateKeyValue
- type Project
- type PublicKey
- type PublicKeyValue
- type Service
- type Signature
- type Team
- type User
- type UserMaster
- type UserPassword
Constants ¶
const ( SignatureClaimType = "signature" RevocationClaimType = "revocation" )
Types of claims that can be made against public keys.
const ( OrgInvitePendingState = "pending" OrgInviteAssociatedState = "associated" OrgInviteAcceptedState = "accepted" OrgInviteApprovedState = "approved" )
Org Invitations exist in four states: pending, associated, accepted, and approved.
const ( SystemTeam = "system" UserTeam = "user" )
There are two types of teams: system and user. System teams are managed by the Arigato registry.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claim ¶
type Claim struct { Created time.Time `json:"created_at"` OrgID *identity.ID `json:"org_id"` OwnerID *identity.ID `json:"owner_id"` Previous *identity.ID `json:"previous"` PublicKeyID *identity.ID `json:"public_key_id"` KeyType string `json:"type"` // contains filtered or unexported fields }
Claim is a signature or revocation claim against a public key.
type Credential ¶
type Credential struct { Credential *CredentialValue `json:"credential"` KeyringID *identity.ID `json:"keyring_id"` Name string `json:"name"` Nonce *base64.Value `json:"nonce"` OrgID *identity.ID `json:"org_id"` PathExp string `json:"pathexp"` Previous *identity.ID `json:"previous"` ProjectID *identity.ID `json:"project_id"` CredentialVersion int `json:"version"` // contains filtered or unexported fields }
Credential is a secret value shared between a group of services based on users identity, operating environment, project, and organization
func (*Credential) Type ¶
func (c *Credential) Type() byte
Type returns the enumerated byte representation of Credential
type CredentialValue ¶
type CredentialValue struct { Algorithm string `json:"alg"` Nonce *base64.Value `json:"nonce"` Value *base64.Value `json:"value"` }
CredentialValue is the secretbox encrypted value of the containing Credential.
type Environment ¶
type Environment struct { Name string `json:"name"` OrgID *identity.ID `json:"org_id"` ProjectID *identity.ID `json:"project_id"` // contains filtered or unexported fields }
Environment is an entity that represents a group of processes
func (*Environment) Type ¶
func (t *Environment) Type() byte
Type returns the enumerated byte representation of Environment
type Keyring ¶
type Keyring struct { Created time.Time `json:"created_at"` OrgID *identity.ID `json:"org_id"` PathExp string `json:"pathexp"` Previous *identity.ID `json:"previous"` ProjectID *identity.ID `json:"project_id"` KeyringVersion int `json:"version"` // contains filtered or unexported fields }
Keyring is a mechanism for sharing a shared secret between many different users and machines at a position in the credential path.
Credentials belong to Keyrings
type KeyringMember ¶
type KeyringMember struct { Created time.Time `json:"created_at"` EncryptingKeyID *identity.ID `json:"encrypting_key_id"` Key *KeyringMemberKey `json:"key"` KeyringID *identity.ID `json:"keyring_id"` OrgID *identity.ID `json:"org_id"` OwnerID *identity.ID `json:"owner_id"` ProjectID *identity.ID `json:"project_id"` PublicKeyID *identity.ID `json:"public_key_id"` // contains filtered or unexported fields }
KeyringMember is a record of sharing a master secret key with a user or machine.
KeyringMember belongs to a Keyring
func (*KeyringMember) Type ¶
func (km *KeyringMember) Type() byte
Type returns the enumerated byte representation of KeyringMember
type KeyringMemberKey ¶
type KeyringMemberKey struct { Algorithm string `json:"alg"` Nonce *base64.Value `json:"nonce"` Value *base64.Value `json:"value"` }
KeyringMemberKey is the keyring master encryption key, encrypted for the owner of a KeyringMember
type Membership ¶
type Membership struct { OrgID *identity.ID `json:"org_id"` OwnerID *identity.ID `json:"owner_id"` TeamID *identity.ID `json:"team_id"` // contains filtered or unexported fields }
Membership is an entity that represents whether a user or machine is a part of a team in an organization.
func (*Membership) Type ¶
func (m *Membership) Type() byte
Type returns the enumerated byte representation of Membership
type Org ¶
type Org struct { Name string `json:"name"` // contains filtered or unexported fields }
Org is a grouping of users that collaborate with each other
type OrgInvite ¶
type OrgInvite struct { OrgID *identity.ID `json:"org_id"` Email string `json:"email"` InviterID *identity.ID `json:"inviter_id"` InviteeID *identity.ID `json:"invitee_id"` ApproverID *identity.ID `json:"approver_id"` State string `json:"state"` Code *struct { Alg string `json:"alg"` Salt *base64.Value `json:"salt"` Value *base64.Value `json:"value"` } `json:"code"` PendingTeams []identity.ID `json:"pending_teams"` Created *time.Time `json:"created_at"` Accepted *time.Time `json:"accepted_at"` Approved *time.Time `json:"approved_at"` // contains filtered or unexported fields }
OrgInvite is an invitation for an individual to join an organization
type Policy ¶
type Policy struct { PolicyType string `json:"type"` Previous *identity.ID `json:"previous"` OrgID *identity.ID `json:"org_id"` Policy *struct { Name string `json:"name"` Description string `json:"description"` Statements []PolicyStatement `json:"statements"` } `json:"policy"` // contains filtered or unexported fields }
Policy is an entity that represents a group of statements for acl
type PolicyAttachment ¶
type PolicyAttachment struct { OwnerID *identity.ID `json:"owner_id"` PolicyID *identity.ID `json:"policy_id"` OrgID *identity.ID `json:"org_id"` // contains filtered or unexported fields }
PolicyAttachment is an entity that represents the link between policies and teams
func (*PolicyAttachment) Type ¶
func (t *PolicyAttachment) Type() byte
Type returns the enumerated byte representation of PolicyAttchment
type PolicyStatement ¶
type PolicyStatement struct { Effect string `json:"effect"` Action []string `json:"action"` // XXX: This could potentially be a string and not []string Resource string `json:"resource"` }
PolicyStatement is an acl statement on a policy object
type PrivateKey ¶
type PrivateKey struct { Key PrivateKeyValue `json:"key"` OrgID *identity.ID `json:"org_id"` OwnerID *identity.ID `json:"owner_id"` PNonce *base64.Value `json:"pnonce"` PublicKeyID *identity.ID `json:"public_key_id"` // contains filtered or unexported fields }
PrivateKey is the private portion of an asymetric key.
func (*PrivateKey) Type ¶
func (pk *PrivateKey) Type() byte
Type returns the enumerated byte representation of PrivateKey.
type PrivateKeyValue ¶
PrivateKeyValue holds the encrypted value of the PrivateKey.
type Project ¶
type Project struct { Name string `json:"name"` OrgID *identity.ID `json:"org_id"` // contains filtered or unexported fields }
Project is an entity that represents a group of services
type PublicKey ¶
type PublicKey struct { Algorithm string `json:"alg"` Created time.Time `json:"created_at"` Expires time.Time `json:"expires_at"` Key PublicKeyValue `json:"key"` OrgID *identity.ID `json:"org_id"` OwnerID *identity.ID `json:"owner_id"` KeyType string `json:"type"` // contains filtered or unexported fields }
PublicKey is the public portion of an asymetric key.
type PublicKeyValue ¶
PublicKeyValue is the actual value of a PublicKey.
type Service ¶
type Service struct { Name string `json:"name"` OrgID *identity.ID `json:"org_id"` ProjectID *identity.ID `json:"project_id"` // contains filtered or unexported fields }
Service is an entity that represents a group of processes
type Signature ¶
type Signature struct { Algorithm string `json:"alg"` PublicKeyID *identity.ID `json:"public_key_id"` Value *base64.Value `json:"value"` }
Signature is an immutable object, but not technically a payload. Its fields must be ordered properly so that ID generation is correct.
If PublicKeyID is nil, the signature is self-signed.
type Team ¶
type Team struct { Name string `json:"name"` OrgID *identity.ID `json:"org_id"` TeamType string `json:"type"` // contains filtered or unexported fields }
Team is an entity that represents a group of users
type User ¶
type User struct { Username string `json:"username"` Name string `json:"name"` Email string `json:"email"` State string `json:"state"` Password *UserPassword `json:"password"` Master *UserMaster `json:"master"` // contains filtered or unexported fields }
User is the body of a user object
type UserMaster ¶
UserMaster is the body.master object for a user