Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRootOnly ¶
Types ¶
type GithubRequest ¶
type GithubRequest struct { Type string CommitHash string Changes map[string]PolicyDiff Requester string RequesterHash string Required int Progress int `hash:"ignore"` }
func CreateGithubRequest ¶
func CreateGithubRequest(auth *vault.AuthInfo, raw map[string]interface{}) (*GithubRequest, error)
verifies user can read all policies in the changes
func (*GithubRequest) Approve ¶
func (r *GithubRequest) Approve(hash string, unsealKey string) error
provides and unseal as an approval to a request if there are sufficient unseal tokens, attempt to roll the change
func (GithubRequest) IsRootOnly ¶
func (r GithubRequest) IsRootOnly() bool
type PolicyDiff ¶
type PolicyRequest ¶
type PolicyRequest struct { Type string PolicyName string Previous string Proposed string Requester string RequesterHash string Required int Progress int `hash:"ignore"` }
func CreatePolicyRequest ¶
func CreatePolicyRequest(auth *vault.AuthInfo, raw map[string]interface{}) (*PolicyRequest, string, error)
constructs the request from limited fields and returns the hash raw must contain two keys: 'policyname' and 'rules'
func (*PolicyRequest) Approve ¶
func (r *PolicyRequest) Approve(hash string, unsealKey string) error
provides an unseal key as an approval to a request if there are sufficient unseal keys, attempt to roll the change
func (PolicyRequest) IsRootOnly ¶
func (r PolicyRequest) IsRootOnly() bool
type Request ¶
type Request interface { IsRootOnly() bool Verify(*vault.AuthInfo) error Approve(string, string) error Reject(*vault.AuthInfo, string) error }
type TokenRequest ¶
type TokenRequest struct { Type string Orphan string Wrap_ttl string Role string CreateRequest *api.TokenCreateRequest CreateResponse *api.Secret Requester string RequesterHash string Required int Progress int `hash:"ignore"` }
func CreateTokenRequest ¶
func CreateTokenRequest(auth *vault.AuthInfo, raw map[string]interface{}) (*TokenRequest, string, error)
constructs the request from limited fields and returns the hash raw must contain key: 'wrap_ttl', and can contain 'orphan', 'role'
func (*TokenRequest) Approve ¶
func (r *TokenRequest) Approve(hash string, unsealKey string) error
provides an unseal token as an approval to a request if there are sufficient unseal tokens, attempt to roll the change
func (TokenRequest) IsRootOnly ¶
func (r TokenRequest) IsRootOnly() bool
Click to show internal directories.
Click to hide internal directories.