zms

package
v1.7.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2017 License: Apache-2.0 Imports: 12 Imported by: 2

README

zms-go-client

A Go client library to talk to Athenz ZMS.

The model.go and client.go files are generated from zms_core, and checked in so users of this library need not know that.

Additionally, an implementation of rdl.Authorizer and rdl.Authenticator are provided that use this library to delegate that functionality to Athenz ZMS:

Release Notes:

Version 1.0 (2016-09-06)
 - Initial opensource release

## Usage

To get it into your workspace:

    go get github.com/yahoo/athenz/clients/go/zms

Then in your Go code:

    import (
        zms "github.com/yahoo/athenz/clients/go/zms"
    )
    func main() {
         var principal rdl.Principal /* init this from an actual user credential */
         ...
         client := zms.NewClient()
         client.AddCredentials(principal.GetHTTPHeaderName(), principal.GetCredentials())
         dmn, err := client.GetDomain("athenz") //
         ...
    }

To use the ZMSAuthorizer from your RDL-generated server:

    import (
        zms "github.com/yahoo/athenz/clients/go/zms"
    )
    ...
    endpoint := "localhost:4080"
    domain := "your.server.domain"

    zmsURL := "http://localhost:10080/zms/v1" //set this to "" for debug mode
    authn := zms.Authenticator(zmsURL)
    authz := zms.Authorizer(domain, zmsURL)

    handler := contacts.Init(impl, url, authz, authn)
    http.ListenAndServe(endpoint, handler)

## License

Copyright 2016 Yahoo Inc.

Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticator

func Authenticator(url string) rdl.Authenticator

Authenticator - an unoptimized authenticator that delegates to ZMS. The advantage is that there is no local state or config other than the url of ZMS (we don't need ZMS's public key to be local).

func Authorizer

func Authorizer(domain string, url string) rdl.Authorizer

Authorizer returns an authorizer that calls zms. If the url is set to "", then the access is logged, but always succeeds (for debug purposes)

func ZMSSchema

func ZMSSchema() *rdl.Schema

Types

type Access

type Access struct {

	//
	// true (allowed) or false (denied)
	//
	Granted bool `json:"granted"`
}

Access - Access can be checked and returned as this resource.

func NewAccess

func NewAccess(init ...*Access) *Access

NewAccess - creates an initialized Access instance, returns a pointer to it

func (*Access) UnmarshalJSON

func (self *Access) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a Access

func (*Access) Validate

func (self *Access) Validate() error

Validate - checks for missing required fields, etc

type ActionName

type ActionName string

ActionName - An action (operation) name.

type Assertion

type Assertion struct {

	//
	// the subject of the assertion - a role
	//
	Role string `json:"role"`

	//
	// the object of the assertion. Must be in the local namespace. Can contain
	// wildcards
	//
	Resource string `json:"resource"`

	//
	// the predicate of the assertion. Can contain wildcards
	//
	Action string `json:"action"`

	//
	// the effect of the assertion in the policy language
	//
	Effect *AssertionEffect `json:"effect,omitempty" rdl:"optional"`

	//
	// assertion id - auto generated by server. Not required during put
	// operations.
	//
	Id *int64 `json:"id,omitempty" rdl:"optional"`
}

Assertion - A representation for the encapsulation of an action to be performed on a resource by a principal.

func NewAssertion

func NewAssertion(init ...*Assertion) *Assertion

NewAssertion - creates an initialized Assertion instance, returns a pointer to it

func (*Assertion) UnmarshalJSON

func (self *Assertion) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a Assertion

func (*Assertion) Validate

func (self *Assertion) Validate() error

Validate - checks for missing required fields, etc

type AssertionEffect

type AssertionEffect int

AssertionEffect - Every assertion can have the effect of ALLOW or DENY.

const (
	ALLOW AssertionEffect
	DENY
)

AssertionEffect constants

func NewAssertionEffect

func NewAssertionEffect(init ...interface{}) AssertionEffect

NewAssertionEffect - return a string representation of the enum

func (AssertionEffect) MarshalJSON

func (e AssertionEffect) MarshalJSON() ([]byte, error)

MarshalJSON is defined for proper JSON encoding of a AssertionEffect

func (AssertionEffect) String

func (e AssertionEffect) String() string

String - return a string representation of the enum

func (AssertionEffect) SymbolSet

func (e AssertionEffect) SymbolSet() []string

SymbolSet - return an array of all valid string representations (symbols) of the enum

func (*AssertionEffect) UnmarshalJSON

func (e *AssertionEffect) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a AssertionEffect

type AuthorityName

type AuthorityName string

AuthorityName - Used as the prefix in a signed assertion. This uniquely identifies a signing authority. i.e. "user"

type CompoundName

type CompoundName string

CompoundName - A compound name. Most names in this API are compound names.

type DanglingPolicy

type DanglingPolicy struct {
	PolicyName EntityName `json:"policyName"`
	RoleName   EntityName `json:"roleName"`
}

DanglingPolicy - A dangling policy where the assertion is referencing a role name that doesn't exist in the domain

func NewDanglingPolicy

func NewDanglingPolicy(init ...*DanglingPolicy) *DanglingPolicy

NewDanglingPolicy - creates an initialized DanglingPolicy instance, returns a pointer to it

func (*DanglingPolicy) UnmarshalJSON

func (self *DanglingPolicy) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a DanglingPolicy

func (*DanglingPolicy) Validate

func (self *DanglingPolicy) Validate() error

Validate - checks for missing required fields, etc

type DefaultAdmins

type DefaultAdmins struct {

	//
	// list of domain administrators
	//
	Admins []ResourceName `json:"admins"`
}

DefaultAdmins - The list of domain administrators.

func NewDefaultAdmins

func NewDefaultAdmins(init ...*DefaultAdmins) *DefaultAdmins

NewDefaultAdmins - creates an initialized DefaultAdmins instance, returns a pointer to it

func (*DefaultAdmins) Init

func (self *DefaultAdmins) Init() *DefaultAdmins

Init - sets up the instance according to its default field values, if any

func (*DefaultAdmins) UnmarshalJSON

func (self *DefaultAdmins) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a DefaultAdmins

func (*DefaultAdmins) Validate

func (self *DefaultAdmins) Validate() error

Validate - checks for missing required fields, etc

type Domain

type Domain struct {

	//
	// the common name to be referred to, the symbolic id. It is immutable
	//
	Name DomainName `json:"name"`

	//
	// the last modification timestamp of any object or attribute in this domain
	//
	Modified *rdl.Timestamp `json:"modified,omitempty" rdl:"optional"`

	//
	// unique identifier of the domain. generated on create, never reused
	//
	Id *rdl.UUID `json:"id,omitempty" rdl:"optional"`

	//
	// description of the domain
	//
	Description string `json:"description,omitempty" rdl:"optional"`

	//
	// a reference to an Organization
	//
	Org ResourceName `json:"org,omitempty" rdl:"optional"`

	//
	// Future use only, currently not used
	//
	Enabled *bool `json:"enabled,omitempty" rdl:"optional"`

	//
	// Flag indicates whether or not domain modifications should be logged for
	// SOX+Auditing. If true, the auditRef parameter must be supplied(not empty) for
	// any API defining it.
	//
	AuditEnabled *bool `json:"auditEnabled,omitempty" rdl:"optional"`

	//
	// associated cloud (i.e. aws) account id
	//
	Account string `json:"account,omitempty" rdl:"optional"`

	//
	// associated product id
	//
	YpmId *int32 `json:"ypmId,omitempty" rdl:"optional"`
}

Domain - A domain is an independent partition of users, roles, and resources. Its name represents the definition of a namespace; the only way a new namespace can be created, from the top, is by creating Domains. Administration of a domain is governed by the parent domain (using reverse-DNS namespaces). The top level domains are governed by the special "sys.auth" domain.

func NewDomain

func NewDomain(init ...*Domain) *Domain

NewDomain - creates an initialized Domain instance, returns a pointer to it

func (*Domain) Init

func (self *Domain) Init() *Domain

Init - sets up the instance according to its default field values, if any

func (*Domain) UnmarshalJSON

func (self *Domain) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a Domain

func (*Domain) Validate

func (self *Domain) Validate() error

Validate - checks for missing required fields, etc

type DomainData

type DomainData struct {

	//
	// name of the domain
	//
	Name DomainName `json:"name"`

	//
	// associated cloud (i.e. aws) account id
	//
	Account string `json:"account,omitempty" rdl:"optional"`

	//
	// associated product id
	//
	YpmId *int32 `json:"ypmId,omitempty" rdl:"optional"`

	//
	// list of roles in the domain
	//
	Roles []*Role `json:"roles"`

	//
	// list of policies in the domain signed with ZMS private key
	//
	Policies *SignedPolicies `json:"policies"`

	//
	// list of services in the domain
	//
	Services []*ServiceIdentity `json:"services"`

	//
	// list of entities in the domain
	//
	Entities []*Entity `json:"entities"`

	//
	// last modification timestamp
	//
	Modified rdl.Timestamp `json:"modified"`
}

DomainData - A domain object that includes its roles, policies and services.

func NewDomainData

func NewDomainData(init ...*DomainData) *DomainData

NewDomainData - creates an initialized DomainData instance, returns a pointer to it

func (*DomainData) Init

func (self *DomainData) Init() *DomainData

Init - sets up the instance according to its default field values, if any

func (*DomainData) UnmarshalJSON

func (self *DomainData) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a DomainData

func (*DomainData) Validate

func (self *DomainData) Validate() error

Validate - checks for missing required fields, etc

type DomainDataCheck

type DomainDataCheck struct {

	//
	// Names of roles not specified in any assertion. Might be empty or null if no
	// dangling roles.
	//
	DanglingRoles []EntityName `json:"danglingRoles,omitempty" rdl:"optional"`

	//
	// Policy+role tuples where role doesnt exist. Might be empty or null if no
	// dangling policies.
	//
	DanglingPolicies []*DanglingPolicy `json:"danglingPolicies,omitempty" rdl:"optional"`

	//
	// total number of policies
	//
	PolicyCount int32 `json:"policyCount"`

	//
	// total number of assertions
	//
	AssertionCount int32 `json:"assertionCount"`

	//
	// total number of assertions containing roles as wildcards
	//
	RoleWildCardCount int32 `json:"roleWildCardCount"`

	//
	// Service names (domain.service) that dont contain trust role if this is a
	// tenant domain. Might be empty or null, if not a tenant or if all providers
	// support this tenant.
	//
	ProvidersWithoutTrust []ServiceName `json:"providersWithoutTrust,omitempty" rdl:"optional"`

	//
	// Names of Tenant domains that dont contain assume role assertions if this is
	// a provider domain. Might be empty or null, if not a provider or if all
	// tenants support use this provider.
	//
	TenantsWithoutAssumeRole []DomainName `json:"tenantsWithoutAssumeRole,omitempty" rdl:"optional"`
}

DomainDataCheck - Domain data object representing the results of a check operation looking for dangling roles, policies and trust relationships that are set either on tenant or provider side only

func NewDomainDataCheck

func NewDomainDataCheck(init ...*DomainDataCheck) *DomainDataCheck

NewDomainDataCheck - creates an initialized DomainDataCheck instance, returns a pointer to it

func (*DomainDataCheck) UnmarshalJSON

func (self *DomainDataCheck) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a DomainDataCheck

func (*DomainDataCheck) Validate

func (self *DomainDataCheck) Validate() error

Validate - checks for missing required fields, etc

type DomainList

type DomainList struct {

	//
	// list of domain names
	//
	Names []DomainName `json:"names"`

	//
	// if the response is a paginated list, this attribute specifies the value to
	// be used in the next domain list request as the value for the skip query
	// parameter.
	//
	Next string `json:"next,omitempty" rdl:"optional"`
}

DomainList - A paginated list of domains.

func NewDomainList

func NewDomainList(init ...*DomainList) *DomainList

NewDomainList - creates an initialized DomainList instance, returns a pointer to it

func (*DomainList) Init

func (self *DomainList) Init() *DomainList

Init - sets up the instance according to its default field values, if any

func (*DomainList) UnmarshalJSON

func (self *DomainList) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a DomainList

func (*DomainList) Validate

func (self *DomainList) Validate() error

Validate - checks for missing required fields, etc

type DomainMeta

type DomainMeta struct {

	//
	// a description of the domain
	//
	Description string `json:"description,omitempty" rdl:"optional"`

	//
	// a reference to an Organization. (i.e. org:media)
	//
	Org ResourceName `json:"org,omitempty" rdl:"optional"`

	//
	// Future use only, currently not used
	//
	Enabled *bool `json:"enabled,omitempty" rdl:"optional"`

	//
	// Flag indicates whether or not domain modifications should be logged for
	// SOX+Auditing. If true, the auditRef parameter must be supplied(not empty) for
	// any API defining it.
	//
	AuditEnabled *bool `json:"auditEnabled,omitempty" rdl:"optional"`

	//
	// associated cloud (i.e. aws) account id
	//
	Account string `json:"account,omitempty" rdl:"optional"`

	//
	// associated product id
	//
	YpmId *int32 `json:"ypmId,omitempty" rdl:"optional"`
}

DomainMeta - Set of metadata attributes that all domains may have and can be changed.

func NewDomainMeta

func NewDomainMeta(init ...*DomainMeta) *DomainMeta

NewDomainMeta - creates an initialized DomainMeta instance, returns a pointer to it

func (*DomainMeta) Init

func (self *DomainMeta) Init() *DomainMeta

Init - sets up the instance according to its default field values, if any

func (*DomainMeta) UnmarshalJSON

func (self *DomainMeta) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a DomainMeta

func (*DomainMeta) Validate

func (self *DomainMeta) Validate() error

Validate - checks for missing required fields, etc

type DomainModified

type DomainModified struct {

	//
	// name of the domain
	//
	Name DomainName `json:"name"`

	//
	// last modified timestamp of the domain
	//
	Modified int64 `json:"modified"`
}

DomainModified - Tuple of domain-name and modification time-stamps. This object is returned when the caller has requested list of domains modified since a specific timestamp.

func NewDomainModified

func NewDomainModified(init ...*DomainModified) *DomainModified

NewDomainModified - creates an initialized DomainModified instance, returns a pointer to it

func (*DomainModified) UnmarshalJSON

func (self *DomainModified) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a DomainModified

func (*DomainModified) Validate

func (self *DomainModified) Validate() error

Validate - checks for missing required fields, etc

type DomainModifiedList

type DomainModifiedList struct {

	//
	// list of modified domains
	//
	NameModList []*DomainModified `json:"nameModList"`
}

DomainModifiedList - A list of {domain, modified-timestamp} tuples.

func NewDomainModifiedList

func NewDomainModifiedList(init ...*DomainModifiedList) *DomainModifiedList

NewDomainModifiedList - creates an initialized DomainModifiedList instance, returns a pointer to it

func (*DomainModifiedList) Init

func (self *DomainModifiedList) Init() *DomainModifiedList

Init - sets up the instance according to its default field values, if any

func (*DomainModifiedList) UnmarshalJSON

func (self *DomainModifiedList) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a DomainModifiedList

func (*DomainModifiedList) Validate

func (self *DomainModifiedList) Validate() error

Validate - checks for missing required fields, etc

type DomainName

type DomainName string

DomainName - A domain name is the general qualifier prefix, as its uniqueness is managed.

type DomainPolicies

type DomainPolicies struct {

	//
	// name of the domain
	//
	Domain DomainName `json:"domain"`

	//
	// list of policies defined in this server
	//
	Policies []*Policy `json:"policies"`
}

DomainPolicies - We need to include the name of the domain in this struct since this data will be passed back to ZPU through ZTS so we need to sign not only the list of policies but also the corresponding domain name that the policies belong to.

func NewDomainPolicies

func NewDomainPolicies(init ...*DomainPolicies) *DomainPolicies

NewDomainPolicies - creates an initialized DomainPolicies instance, returns a pointer to it

func (*DomainPolicies) Init

func (self *DomainPolicies) Init() *DomainPolicies

Init - sets up the instance according to its default field values, if any

func (*DomainPolicies) UnmarshalJSON

func (self *DomainPolicies) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a DomainPolicies

func (*DomainPolicies) Validate

func (self *DomainPolicies) Validate() error

Validate - checks for missing required fields, etc

type DomainTemplate

type DomainTemplate struct {

	//
	// list of template names
	//
	TemplateNames []SimpleName `json:"templateNames"`
}

DomainTemplate - solution template(s) to be applied to a domain

func NewDomainTemplate

func NewDomainTemplate(init ...*DomainTemplate) *DomainTemplate

NewDomainTemplate - creates an initialized DomainTemplate instance, returns a pointer to it

func (*DomainTemplate) Init

func (self *DomainTemplate) Init() *DomainTemplate

Init - sets up the instance according to its default field values, if any

func (*DomainTemplate) UnmarshalJSON

func (self *DomainTemplate) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a DomainTemplate

func (*DomainTemplate) Validate

func (self *DomainTemplate) Validate() error

Validate - checks for missing required fields, etc

type DomainTemplateList

type DomainTemplateList struct {

	//
	// list of template names
	//
	TemplateNames []SimpleName `json:"templateNames"`
}

DomainTemplateList - List of solution templates to be applied to a domain

func NewDomainTemplateList

func NewDomainTemplateList(init ...*DomainTemplateList) *DomainTemplateList

NewDomainTemplateList - creates an initialized DomainTemplateList instance, returns a pointer to it

func (*DomainTemplateList) Init

func (self *DomainTemplateList) Init() *DomainTemplateList

Init - sets up the instance according to its default field values, if any

func (*DomainTemplateList) UnmarshalJSON

func (self *DomainTemplateList) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a DomainTemplateList

func (*DomainTemplateList) Validate

func (self *DomainTemplateList) Validate() error

Validate - checks for missing required fields, etc

type Entity

type Entity struct {

	//
	// name of the entity object
	//
	Name EntityName `json:"name"`

	//
	// value of the entity
	//
	Value rdl.Struct `json:"value"`
}

Entity - An entity is a name and a structured value. some entity names/prefixes are reserved (i.e. "role", "policy", "meta", "domain", "service")

func NewEntity

func NewEntity(init ...*Entity) *Entity

NewEntity - creates an initialized Entity instance, returns a pointer to it

func (*Entity) Init

func (self *Entity) Init() *Entity

Init - sets up the instance according to its default field values, if any

func (*Entity) UnmarshalJSON

func (self *Entity) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a Entity

func (*Entity) Validate

func (self *Entity) Validate() error

Validate - checks for missing required fields, etc

type EntityList

type EntityList struct {

	//
	// list of entity names
	//
	Names []EntityName `json:"names"`
}

EntityList - The representation for an enumeration of entities in the namespace

func NewEntityList

func NewEntityList(init ...*EntityList) *EntityList

NewEntityList - creates an initialized EntityList instance, returns a pointer to it

func (*EntityList) Init

func (self *EntityList) Init() *EntityList

Init - sets up the instance according to its default field values, if any

func (*EntityList) UnmarshalJSON

func (self *EntityList) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a EntityList

func (*EntityList) Validate

func (self *EntityList) Validate() error

Validate - checks for missing required fields, etc

type EntityName

type EntityName string

EntityName - An entity name is a short form of a resource name, including only the domain and entity.

type LocationName

type LocationName string

LocationName - A location name is not yet defined, but will be a dotted name like everything else.

type MemberName added in v1.7.3

type MemberName string

MemberName - Role Member name - could be one of three values, either *, DomainName.* or ResourceName

type Membership

type Membership struct {

	//
	// name of the member
	//
	MemberName MemberName `json:"memberName"`

	//
	// flag to indicate whether or the user is a member or not
	//
	IsMember *bool `json:"isMember,omitempty" rdl:"optional"`

	//
	// name of the role
	//
	RoleName ResourceName `json:"roleName,omitempty" rdl:"optional"`

	//
	// the expiration timestamp
	//
	Expiration *rdl.Timestamp `json:"expiration,omitempty" rdl:"optional"`
}

Membership - The representation for a role membership.

func NewMembership

func NewMembership(init ...*Membership) *Membership

NewMembership - creates an initialized Membership instance, returns a pointer to it

func (*Membership) Init

func (self *Membership) Init() *Membership

Init - sets up the instance according to its default field values, if any

func (*Membership) UnmarshalJSON

func (self *Membership) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a Membership

func (*Membership) Validate

func (self *Membership) Validate() error

Validate - checks for missing required fields, etc

type Policies

type Policies struct {

	//
	// list of policy objects
	//
	List []*Policy `json:"list"`
}

Policies - The representation of list of policy objects

func NewPolicies

func NewPolicies(init ...*Policies) *Policies

NewPolicies - creates an initialized Policies instance, returns a pointer to it

func (*Policies) Init

func (self *Policies) Init() *Policies

Init - sets up the instance according to its default field values, if any

func (*Policies) UnmarshalJSON

func (self *Policies) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a Policies

func (*Policies) Validate

func (self *Policies) Validate() error

Validate - checks for missing required fields, etc

type Policy

type Policy struct {

	//
	// name of the policy
	//
	Name ResourceName `json:"name"`

	//
	// last modification timestamp of this policy
	//
	Modified *rdl.Timestamp `json:"modified,omitempty" rdl:"optional"`

	//
	// list of defined assertions for this policy
	//
	Assertions []*Assertion `json:"assertions"`
}

Policy - The representation for a Policy with set of assertions.

func NewPolicy

func NewPolicy(init ...*Policy) *Policy

NewPolicy - creates an initialized Policy instance, returns a pointer to it

func (*Policy) Init

func (self *Policy) Init() *Policy

Init - sets up the instance according to its default field values, if any

func (*Policy) UnmarshalJSON

func (self *Policy) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a Policy

func (*Policy) Validate

func (self *Policy) Validate() error

Validate - checks for missing required fields, etc

type PolicyList

type PolicyList struct {

	//
	// list of policy names
	//
	Names []EntityName `json:"names"`

	//
	// if the response is a paginated list, this attribute specifies the value to
	// be used in the next policy list request as the value for the skip query
	// parameter.
	//
	Next string `json:"next,omitempty" rdl:"optional"`
}

PolicyList - The representation for an enumeration of policies in the namespace, with pagination.

func NewPolicyList

func NewPolicyList(init ...*PolicyList) *PolicyList

NewPolicyList - creates an initialized PolicyList instance, returns a pointer to it

func (*PolicyList) Init

func (self *PolicyList) Init() *PolicyList

Init - sets up the instance according to its default field values, if any

func (*PolicyList) UnmarshalJSON

func (self *PolicyList) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a PolicyList

func (*PolicyList) Validate

func (self *PolicyList) Validate() error

Validate - checks for missing required fields, etc

type ProviderResourceGroupRoles

type ProviderResourceGroupRoles struct {

	//
	// name of the provider domain
	//
	Domain DomainName `json:"domain"`

	//
	// name of the provider service
	//
	Service SimpleName `json:"service"`

	//
	// name of the tenant domain
	//
	Tenant DomainName `json:"tenant"`

	//
	// the role/action pairs to provision
	//
	Roles []*TenantRoleAction `json:"roles"`

	//
	// tenant resource group
	//
	ResourceGroup EntityName `json:"resourceGroup"`
}

ProviderResourceGroupRoles - A representation of provider roles to be provisioned.

func NewProviderResourceGroupRoles

func NewProviderResourceGroupRoles(init ...*ProviderResourceGroupRoles) *ProviderResourceGroupRoles

NewProviderResourceGroupRoles - creates an initialized ProviderResourceGroupRoles instance, returns a pointer to it

func (*ProviderResourceGroupRoles) Init

Init - sets up the instance according to its default field values, if any

func (*ProviderResourceGroupRoles) UnmarshalJSON

func (self *ProviderResourceGroupRoles) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a ProviderResourceGroupRoles

func (*ProviderResourceGroupRoles) Validate

func (self *ProviderResourceGroupRoles) Validate() error

Validate - checks for missing required fields, etc

type PublicKeyEntry

type PublicKeyEntry struct {

	//
	// the public key for the service
	//
	Key string `json:"key"`

	//
	// the key identifier (version or zone name)
	//
	Id string `json:"id"`
}

PublicKeyEntry - The representation of the public key in a service identity object.

func NewPublicKeyEntry

func NewPublicKeyEntry(init ...*PublicKeyEntry) *PublicKeyEntry

NewPublicKeyEntry - creates an initialized PublicKeyEntry instance, returns a pointer to it

func (*PublicKeyEntry) UnmarshalJSON

func (self *PublicKeyEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a PublicKeyEntry

func (*PublicKeyEntry) Validate

func (self *PublicKeyEntry) Validate() error

Validate - checks for missing required fields, etc

type ResourceAccess

type ResourceAccess struct {
	Principal  EntityName   `json:"principal"`
	Assertions []*Assertion `json:"assertions"`
}

ResourceAccess -

func NewResourceAccess

func NewResourceAccess(init ...*ResourceAccess) *ResourceAccess

NewResourceAccess - creates an initialized ResourceAccess instance, returns a pointer to it

func (*ResourceAccess) Init

func (self *ResourceAccess) Init() *ResourceAccess

Init - sets up the instance according to its default field values, if any

func (*ResourceAccess) UnmarshalJSON

func (self *ResourceAccess) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a ResourceAccess

func (*ResourceAccess) Validate

func (self *ResourceAccess) Validate() error

Validate - checks for missing required fields, etc

type ResourceAccessList

type ResourceAccessList struct {
	Resources []*ResourceAccess `json:"resources"`
}

ResourceAccessList -

func NewResourceAccessList

func NewResourceAccessList(init ...*ResourceAccessList) *ResourceAccessList

NewResourceAccessList - creates an initialized ResourceAccessList instance, returns a pointer to it

func (*ResourceAccessList) Init

func (self *ResourceAccessList) Init() *ResourceAccessList

Init - sets up the instance according to its default field values, if any

func (*ResourceAccessList) UnmarshalJSON

func (self *ResourceAccessList) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a ResourceAccessList

func (*ResourceAccessList) Validate

func (self *ResourceAccessList) Validate() error

Validate - checks for missing required fields, etc

type ResourceName

type ResourceName string

ResourceName - A resource name Note that the EntityName part is optional, that is, a domain name followed by a colon is valid resource name.

type Role

type Role struct {

	//
	// name of the role
	//
	Name ResourceName `json:"name"`

	//
	// last modification timestamp of the role
	//
	Modified *rdl.Timestamp `json:"modified,omitempty" rdl:"optional"`

	//
	// an explicit list of members. Might be empty or null, if trust is set
	//
	Members []MemberName `json:"members,omitempty" rdl:"optional"`

	//
	// members with expiration
	//
	RoleMembers []*RoleMember `json:"roleMembers,omitempty" rdl:"optional"`

	//
	// a trusted domain to delegate membership decisions to
	//
	Trust DomainName `json:"trust,omitempty" rdl:"optional"`

	//
	// an audit log for role membership changes
	//
	AuditLog []*RoleAuditLog `json:"auditLog,omitempty" rdl:"optional"`
}

Role - The representation for a Role with set of members.

func NewRole

func NewRole(init ...*Role) *Role

NewRole - creates an initialized Role instance, returns a pointer to it

func (*Role) UnmarshalJSON

func (self *Role) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a Role

func (*Role) Validate

func (self *Role) Validate() error

Validate - checks for missing required fields, etc

type RoleAuditLog

type RoleAuditLog struct {

	//
	// name of the role member
	//
	Member MemberName `json:"member"`

	//
	// name of the principal executing the change
	//
	Admin ResourceName `json:"admin"`

	//
	// timestamp of the entry
	//
	Created rdl.Timestamp `json:"created"`

	//
	// log action - either add or delete
	//
	Action string `json:"action"`

	//
	// audit reference string for the change as supplied by admin
	//
	AuditRef string `json:"auditRef,omitempty" rdl:"optional"`
}

RoleAuditLog - An audit log entry for role membership change.

func NewRoleAuditLog

func NewRoleAuditLog(init ...*RoleAuditLog) *RoleAuditLog

NewRoleAuditLog - creates an initialized RoleAuditLog instance, returns a pointer to it

func (*RoleAuditLog) UnmarshalJSON

func (self *RoleAuditLog) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a RoleAuditLog

func (*RoleAuditLog) Validate

func (self *RoleAuditLog) Validate() error

Validate - checks for missing required fields, etc

type RoleList

type RoleList struct {

	//
	// list of role names
	//
	Names []EntityName `json:"names"`

	//
	// if the response is a paginated list, this attribute specifies the value to
	// be used in the next role list request as the value for the skip query
	// parameter.
	//
	Next string `json:"next,omitempty" rdl:"optional"`
}

RoleList - The representation for an enumeration of roles in the namespace, with pagination.

func NewRoleList

func NewRoleList(init ...*RoleList) *RoleList

NewRoleList - creates an initialized RoleList instance, returns a pointer to it

func (*RoleList) Init

func (self *RoleList) Init() *RoleList

Init - sets up the instance according to its default field values, if any

func (*RoleList) UnmarshalJSON

func (self *RoleList) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a RoleList

func (*RoleList) Validate

func (self *RoleList) Validate() error

Validate - checks for missing required fields, etc

type RoleMember added in v1.1.5

type RoleMember struct {

	//
	// name of the member
	//
	MemberName MemberName `json:"memberName"`

	//
	// the expiration timestamp
	//
	Expiration *rdl.Timestamp `json:"expiration,omitempty" rdl:"optional"`
}

RoleMember -

func NewRoleMember added in v1.1.5

func NewRoleMember(init ...*RoleMember) *RoleMember

NewRoleMember - creates an initialized RoleMember instance, returns a pointer to it

func (*RoleMember) UnmarshalJSON added in v1.1.5

func (self *RoleMember) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a RoleMember

func (*RoleMember) Validate added in v1.1.5

func (self *RoleMember) Validate() error

Validate - checks for missing required fields, etc

type Roles

type Roles struct {

	//
	// list of role objects
	//
	List []*Role `json:"list"`
}

Roles - The representation for a list of roles with full details

func NewRoles

func NewRoles(init ...*Roles) *Roles

NewRoles - creates an initialized Roles instance, returns a pointer to it

func (*Roles) Init

func (self *Roles) Init() *Roles

Init - sets up the instance according to its default field values, if any

func (*Roles) UnmarshalJSON

func (self *Roles) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a Roles

func (*Roles) Validate

func (self *Roles) Validate() error

Validate - checks for missing required fields, etc

type ServerTemplateList

type ServerTemplateList struct {

	//
	// list of template names
	//
	TemplateNames []SimpleName `json:"templateNames"`
}

ServerTemplateList - List of solution templates available in the server

func NewServerTemplateList

func NewServerTemplateList(init ...*ServerTemplateList) *ServerTemplateList

NewServerTemplateList - creates an initialized ServerTemplateList instance, returns a pointer to it

func (*ServerTemplateList) Init

func (self *ServerTemplateList) Init() *ServerTemplateList

Init - sets up the instance according to its default field values, if any

func (*ServerTemplateList) UnmarshalJSON

func (self *ServerTemplateList) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a ServerTemplateList

func (*ServerTemplateList) Validate

func (self *ServerTemplateList) Validate() error

Validate - checks for missing required fields, etc

type ServiceIdentities

type ServiceIdentities struct {

	//
	// list of services
	//
	List []*ServiceIdentity `json:"list"`
}

ServiceIdentities - The representation of list of services

func NewServiceIdentities

func NewServiceIdentities(init ...*ServiceIdentities) *ServiceIdentities

NewServiceIdentities - creates an initialized ServiceIdentities instance, returns a pointer to it

func (*ServiceIdentities) Init

func (self *ServiceIdentities) Init() *ServiceIdentities

Init - sets up the instance according to its default field values, if any

func (*ServiceIdentities) UnmarshalJSON

func (self *ServiceIdentities) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a ServiceIdentities

func (*ServiceIdentities) Validate

func (self *ServiceIdentities) Validate() error

Validate - checks for missing required fields, etc

type ServiceIdentity

type ServiceIdentity struct {

	//
	// the full name of the service, i.e. "sports.storage"
	//
	Name ServiceName `json:"name"`

	//
	// array of public keys for key rotation
	//
	PublicKeys []*PublicKeyEntry `json:"publicKeys,omitempty" rdl:"optional"`

	//
	// if present, then this service can provision tenants via this endpoint.
	//
	ProviderEndpoint string `json:"providerEndpoint,omitempty" rdl:"optional"`

	//
	// the timestamp when this entry was last modified
	//
	Modified *rdl.Timestamp `json:"modified,omitempty" rdl:"optional"`

	//
	// the path of the executable that runs the service
	//
	Executable string `json:"executable,omitempty" rdl:"optional"`

	//
	// list of host names that this service can run on
	//
	Hosts []string `json:"hosts,omitempty" rdl:"optional"`

	//
	// local (unix) user name this service can run as
	//
	User string `json:"user,omitempty" rdl:"optional"`

	//
	// local (unix) group name this service can run as
	//
	Group string `json:"group,omitempty" rdl:"optional"`
}

ServiceIdentity - The representation of the service identity object.

func NewServiceIdentity

func NewServiceIdentity(init ...*ServiceIdentity) *ServiceIdentity

NewServiceIdentity - creates an initialized ServiceIdentity instance, returns a pointer to it

func (*ServiceIdentity) UnmarshalJSON

func (self *ServiceIdentity) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a ServiceIdentity

func (*ServiceIdentity) Validate

func (self *ServiceIdentity) Validate() error

Validate - checks for missing required fields, etc

type ServiceIdentityList

type ServiceIdentityList struct {

	//
	// list of service names
	//
	Names []EntityName `json:"names"`

	//
	// if the response is a paginated list, this attribute specifies the value to
	// be used in the next service list request as the value for the skip query
	// parameter.
	//
	Next string `json:"next,omitempty" rdl:"optional"`
}

ServiceIdentityList - The representation for an enumeration of services in the namespace, with pagination.

func NewServiceIdentityList

func NewServiceIdentityList(init ...*ServiceIdentityList) *ServiceIdentityList

NewServiceIdentityList - creates an initialized ServiceIdentityList instance, returns a pointer to it

func (*ServiceIdentityList) Init

Init - sets up the instance according to its default field values, if any

func (*ServiceIdentityList) UnmarshalJSON

func (self *ServiceIdentityList) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a ServiceIdentityList

func (*ServiceIdentityList) Validate

func (self *ServiceIdentityList) Validate() error

Validate - checks for missing required fields, etc

type ServiceName

type ServiceName string

ServiceName - A service name will generally be a unique subdomain.

type ServicePrincipal

type ServicePrincipal struct {

	//
	// name of the domain
	//
	Domain DomainName `json:"domain"`

	//
	// name of the service
	//
	Service EntityName `json:"service"`

	//
	// service's signed token
	//
	Token SignedToken `json:"token"`
}

ServicePrincipal - A service principal object identifying a given service.

func NewServicePrincipal

func NewServicePrincipal(init ...*ServicePrincipal) *ServicePrincipal

NewServicePrincipal - creates an initialized ServicePrincipal instance, returns a pointer to it

func (*ServicePrincipal) UnmarshalJSON

func (self *ServicePrincipal) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a ServicePrincipal

func (*ServicePrincipal) Validate

func (self *ServicePrincipal) Validate() error

Validate - checks for missing required fields, etc

type SignedDomain

type SignedDomain struct {

	//
	// domain object with its roles, policies and services
	//
	Domain *DomainData `json:"domain"`

	//
	// signature generated based on the domain object
	//
	Signature string `json:"signature"`

	//
	// the identifier of the key used to generate the signature
	//
	KeyId string `json:"keyId"`
}

SignedDomain - A domain object signed with server's private key

func NewSignedDomain

func NewSignedDomain(init ...*SignedDomain) *SignedDomain

NewSignedDomain - creates an initialized SignedDomain instance, returns a pointer to it

func (*SignedDomain) Init

func (self *SignedDomain) Init() *SignedDomain

Init - sets up the instance according to its default field values, if any

func (*SignedDomain) UnmarshalJSON

func (self *SignedDomain) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a SignedDomain

func (*SignedDomain) Validate

func (self *SignedDomain) Validate() error

Validate - checks for missing required fields, etc

type SignedDomains

type SignedDomains struct {
	Domains []*SignedDomain `json:"domains"`
}

SignedDomains - A list of signed domain objects

func NewSignedDomains

func NewSignedDomains(init ...*SignedDomains) *SignedDomains

NewSignedDomains - creates an initialized SignedDomains instance, returns a pointer to it

func (*SignedDomains) Init

func (self *SignedDomains) Init() *SignedDomains

Init - sets up the instance according to its default field values, if any

func (*SignedDomains) UnmarshalJSON

func (self *SignedDomains) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a SignedDomains

func (*SignedDomains) Validate

func (self *SignedDomains) Validate() error

Validate - checks for missing required fields, etc

type SignedPolicies

type SignedPolicies struct {

	//
	// list of policies defined in a domain
	//
	Contents *DomainPolicies `json:"contents"`

	//
	// signature generated based on the domain policies object
	//
	Signature string `json:"signature"`

	//
	// the identifier of the key used to generate the signature
	//
	KeyId string `json:"keyId"`
}

SignedPolicies - A signed bulk transfer of policies. The data is signed with server's private key.

func NewSignedPolicies

func NewSignedPolicies(init ...*SignedPolicies) *SignedPolicies

NewSignedPolicies - creates an initialized SignedPolicies instance, returns a pointer to it

func (*SignedPolicies) Init

func (self *SignedPolicies) Init() *SignedPolicies

Init - sets up the instance according to its default field values, if any

func (*SignedPolicies) UnmarshalJSON

func (self *SignedPolicies) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a SignedPolicies

func (*SignedPolicies) Validate

func (self *SignedPolicies) Validate() error

Validate - checks for missing required fields, etc

type SignedToken

type SignedToken string

SignedToken - A signed assertion if identity. i.e. the user cookie value. This token will only make sense to the authority that generated it, so it is beneficial to have something in the value that is cheaply recognized to quickly reject if it belongs to another authority. In addition to the YEncoded set our token includes ; to separate components and , to separate roles and : for IPv6 addresses

type SimpleName

type SimpleName string

SimpleName - Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache version 2.0 license. See LICENSE file for terms. Common name types used by several API definitions A simple identifier, an element of compound name.

type SubDomain

type SubDomain struct {

	//
	// a description of the domain
	//
	Description string `json:"description,omitempty" rdl:"optional"`

	//
	// a reference to an Organization. (i.e. org:media)
	//
	Org ResourceName `json:"org,omitempty" rdl:"optional"`

	//
	// Future use only, currently not used
	//
	Enabled *bool `json:"enabled,omitempty" rdl:"optional"`

	//
	// Flag indicates whether or not domain modifications should be logged for
	// SOX+Auditing. If true, the auditRef parameter must be supplied(not empty) for
	// any API defining it.
	//
	AuditEnabled *bool `json:"auditEnabled,omitempty" rdl:"optional"`

	//
	// associated cloud (i.e. aws) account id
	//
	Account string `json:"account,omitempty" rdl:"optional"`

	//
	// associated product id
	//
	YpmId *int32 `json:"ypmId,omitempty" rdl:"optional"`

	//
	// name of the domain
	//
	Name SimpleName `json:"name"`

	//
	// list of domain administrators
	//
	AdminUsers []ResourceName `json:"adminUsers"`

	//
	// list of solution template names
	//
	Templates *DomainTemplateList `json:"templates,omitempty" rdl:"optional"`

	//
	// name of the parent domain
	//
	Parent DomainName `json:"parent"`
}

SubDomain - A Subdomain is a TopLevelDomain, except it has a parent.

func NewSubDomain

func NewSubDomain(init ...*SubDomain) *SubDomain

NewSubDomain - creates an initialized SubDomain instance, returns a pointer to it

func (*SubDomain) Init

func (self *SubDomain) Init() *SubDomain

Init - sets up the instance according to its default field values, if any

func (*SubDomain) UnmarshalJSON

func (self *SubDomain) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a SubDomain

func (*SubDomain) Validate

func (self *SubDomain) Validate() error

Validate - checks for missing required fields, etc

type Template

type Template struct {

	//
	// list of roles in the template
	//
	Roles []*Role `json:"roles"`

	//
	// list of policies defined in this template
	//
	Policies []*Policy `json:"policies"`
}

Template - Solution Template object defined on the server

func NewTemplate

func NewTemplate(init ...*Template) *Template

NewTemplate - creates an initialized Template instance, returns a pointer to it

func (*Template) Init

func (self *Template) Init() *Template

Init - sets up the instance according to its default field values, if any

func (*Template) UnmarshalJSON

func (self *Template) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a Template

func (*Template) Validate

func (self *Template) Validate() error

Validate - checks for missing required fields, etc

type TemplateList

type TemplateList struct {

	//
	// list of template names
	//
	TemplateNames []SimpleName `json:"templateNames"`
}

TemplateList - List of template names that is the base struct for server and domain templates

func NewTemplateList

func NewTemplateList(init ...*TemplateList) *TemplateList

NewTemplateList - creates an initialized TemplateList instance, returns a pointer to it

func (*TemplateList) Init

func (self *TemplateList) Init() *TemplateList

Init - sets up the instance according to its default field values, if any

func (*TemplateList) UnmarshalJSON

func (self *TemplateList) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a TemplateList

func (*TemplateList) Validate

func (self *TemplateList) Validate() error

Validate - checks for missing required fields, etc

type Tenancy

type Tenancy struct {

	//
	// the domain that is to get a tenancy
	//
	Domain DomainName `json:"domain"`

	//
	// the provider service on which the tenancy is to reside
	//
	Service ServiceName `json:"service"`

	//
	// registered resource groups for this tenant
	//
	ResourceGroups []EntityName `json:"resourceGroups,omitempty" rdl:"optional"`
}

Tenancy - A representation of tenant.

func NewTenancy

func NewTenancy(init ...*Tenancy) *Tenancy

NewTenancy - creates an initialized Tenancy instance, returns a pointer to it

func (*Tenancy) UnmarshalJSON

func (self *Tenancy) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a Tenancy

func (*Tenancy) Validate

func (self *Tenancy) Validate() error

Validate - checks for missing required fields, etc

type TenancyResourceGroup

type TenancyResourceGroup struct {

	//
	// the domain that is to get a tenancy
	//
	Domain DomainName `json:"domain"`

	//
	// the provider service on which the tenancy is to reside
	//
	Service ServiceName `json:"service"`

	//
	// registered resource group for this tenant
	//
	ResourceGroup EntityName `json:"resourceGroup"`
}

TenancyResourceGroup -

func NewTenancyResourceGroup

func NewTenancyResourceGroup(init ...*TenancyResourceGroup) *TenancyResourceGroup

NewTenancyResourceGroup - creates an initialized TenancyResourceGroup instance, returns a pointer to it

func (*TenancyResourceGroup) UnmarshalJSON

func (self *TenancyResourceGroup) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a TenancyResourceGroup

func (*TenancyResourceGroup) Validate

func (self *TenancyResourceGroup) Validate() error

Validate - checks for missing required fields, etc

type TenantResourceGroupRoles

type TenantResourceGroupRoles struct {

	//
	// name of the provider domain
	//
	Domain DomainName `json:"domain"`

	//
	// name of the provider service
	//
	Service SimpleName `json:"service"`

	//
	// name of the tenant domain
	//
	Tenant DomainName `json:"tenant"`

	//
	// the role/action pairs to provision
	//
	Roles []*TenantRoleAction `json:"roles"`

	//
	// tenant resource group
	//
	ResourceGroup EntityName `json:"resourceGroup"`
}

TenantResourceGroupRoles - A representation of tenant roles for resource groups to be provisioned.

func NewTenantResourceGroupRoles

func NewTenantResourceGroupRoles(init ...*TenantResourceGroupRoles) *TenantResourceGroupRoles

NewTenantResourceGroupRoles - creates an initialized TenantResourceGroupRoles instance, returns a pointer to it

func (*TenantResourceGroupRoles) Init

Init - sets up the instance according to its default field values, if any

func (*TenantResourceGroupRoles) UnmarshalJSON

func (self *TenantResourceGroupRoles) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a TenantResourceGroupRoles

func (*TenantResourceGroupRoles) Validate

func (self *TenantResourceGroupRoles) Validate() error

Validate - checks for missing required fields, etc

type TenantRoleAction

type TenantRoleAction struct {

	//
	// name of the role
	//
	Role SimpleName `json:"role"`

	//
	// action value for the generated policy assertion
	//
	Action string `json:"action"`
}

TenantRoleAction - A representation of tenant role action.

func NewTenantRoleAction

func NewTenantRoleAction(init ...*TenantRoleAction) *TenantRoleAction

NewTenantRoleAction - creates an initialized TenantRoleAction instance, returns a pointer to it

func (*TenantRoleAction) UnmarshalJSON

func (self *TenantRoleAction) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a TenantRoleAction

func (*TenantRoleAction) Validate

func (self *TenantRoleAction) Validate() error

Validate - checks for missing required fields, etc

type TenantRoles

type TenantRoles struct {

	//
	// name of the provider domain
	//
	Domain DomainName `json:"domain"`

	//
	// name of the provider service
	//
	Service SimpleName `json:"service"`

	//
	// name of the tenant domain
	//
	Tenant DomainName `json:"tenant"`

	//
	// the role/action pairs to provision
	//
	Roles []*TenantRoleAction `json:"roles"`
}

TenantRoles - A representation of tenant roles to be provisioned.

func NewTenantRoles

func NewTenantRoles(init ...*TenantRoles) *TenantRoles

NewTenantRoles - creates an initialized TenantRoles instance, returns a pointer to it

func (*TenantRoles) Init

func (self *TenantRoles) Init() *TenantRoles

Init - sets up the instance according to its default field values, if any

func (*TenantRoles) UnmarshalJSON

func (self *TenantRoles) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a TenantRoles

func (*TenantRoles) Validate

func (self *TenantRoles) Validate() error

Validate - checks for missing required fields, etc

type TopLevelDomain

type TopLevelDomain struct {

	//
	// a description of the domain
	//
	Description string `json:"description,omitempty" rdl:"optional"`

	//
	// a reference to an Organization. (i.e. org:media)
	//
	Org ResourceName `json:"org,omitempty" rdl:"optional"`

	//
	// Future use only, currently not used
	//
	Enabled *bool `json:"enabled,omitempty" rdl:"optional"`

	//
	// Flag indicates whether or not domain modifications should be logged for
	// SOX+Auditing. If true, the auditRef parameter must be supplied(not empty) for
	// any API defining it.
	//
	AuditEnabled *bool `json:"auditEnabled,omitempty" rdl:"optional"`

	//
	// associated cloud (i.e. aws) account id
	//
	Account string `json:"account,omitempty" rdl:"optional"`

	//
	// associated product id
	//
	YpmId *int32 `json:"ypmId,omitempty" rdl:"optional"`

	//
	// name of the domain
	//
	Name SimpleName `json:"name"`

	//
	// list of domain administrators
	//
	AdminUsers []ResourceName `json:"adminUsers"`

	//
	// list of solution template names
	//
	Templates *DomainTemplateList `json:"templates,omitempty" rdl:"optional"`
}

TopLevelDomain - Top Level Domain object. The required attributes include the name of the domain and list of domain administrators.

func NewTopLevelDomain

func NewTopLevelDomain(init ...*TopLevelDomain) *TopLevelDomain

NewTopLevelDomain - creates an initialized TopLevelDomain instance, returns a pointer to it

func (*TopLevelDomain) Init

func (self *TopLevelDomain) Init() *TopLevelDomain

Init - sets up the instance according to its default field values, if any

func (*TopLevelDomain) UnmarshalJSON

func (self *TopLevelDomain) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a TopLevelDomain

func (*TopLevelDomain) Validate

func (self *TopLevelDomain) Validate() error

Validate - checks for missing required fields, etc

type UserDomain

type UserDomain struct {

	//
	// a description of the domain
	//
	Description string `json:"description,omitempty" rdl:"optional"`

	//
	// a reference to an Organization. (i.e. org:media)
	//
	Org ResourceName `json:"org,omitempty" rdl:"optional"`

	//
	// Future use only, currently not used
	//
	Enabled *bool `json:"enabled,omitempty" rdl:"optional"`

	//
	// Flag indicates whether or not domain modifications should be logged for
	// SOX+Auditing. If true, the auditRef parameter must be supplied(not empty) for
	// any API defining it.
	//
	AuditEnabled *bool `json:"auditEnabled,omitempty" rdl:"optional"`

	//
	// associated cloud (i.e. aws) account id
	//
	Account string `json:"account,omitempty" rdl:"optional"`

	//
	// associated product id
	//
	YpmId *int32 `json:"ypmId,omitempty" rdl:"optional"`

	//
	// user id which will be the domain name
	//
	Name SimpleName `json:"name"`

	//
	// list of solution template names
	//
	Templates *DomainTemplateList `json:"templates,omitempty" rdl:"optional"`
}

UserDomain - A UserDomain is the user's own top level domain in user - e.g. user.hga

func NewUserDomain

func NewUserDomain(init ...*UserDomain) *UserDomain

NewUserDomain - creates an initialized UserDomain instance, returns a pointer to it

func (*UserDomain) Init

func (self *UserDomain) Init() *UserDomain

Init - sets up the instance according to its default field values, if any

func (*UserDomain) UnmarshalJSON

func (self *UserDomain) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a UserDomain

func (*UserDomain) Validate

func (self *UserDomain) Validate() error

Validate - checks for missing required fields, etc

type UserToken

type UserToken struct {

	//
	// Signed user token identifying a specific authenticated user
	//
	Token SignedToken `json:"token"`
}

UserToken - A user token generated based on user's credentials

func NewUserToken

func NewUserToken(init ...*UserToken) *UserToken

NewUserToken - creates an initialized UserToken instance, returns a pointer to it

func (*UserToken) UnmarshalJSON

func (self *UserToken) UnmarshalJSON(b []byte) error

UnmarshalJSON is defined for proper JSON decoding of a UserToken

func (*UserToken) Validate

func (self *UserToken) Validate() error

Validate - checks for missing required fields, etc

type YBase64

type YBase64 string

YBase64 - The Y-specific URL-safe Base64 variant.

type YEncoded

type YEncoded string

YEncoded - YEncoded includes ybase64 chars, as well as = and %. This can represent a user cookie and URL-encoded values.

type ZMSClient

type ZMSClient struct {
	URL         string
	Transport   http.RoundTripper
	CredsHeader *string
	CredsToken  *string
	Timeout     time.Duration
}

func NewClient

func NewClient(url string, transport http.RoundTripper) ZMSClient

NewClient creates and returns a new HTTP client object for the ZMS service

func (*ZMSClient) AddCredentials

func (client *ZMSClient) AddCredentials(header string, token string)

AddCredentials adds the credentials to the client for subsequent requests.

func (ZMSClient) DeleteAssertion

func (client ZMSClient) DeleteAssertion(domainName DomainName, policyName EntityName, assertionId int64, auditRef string) error

func (ZMSClient) DeleteDomainTemplate

func (client ZMSClient) DeleteDomainTemplate(name DomainName, template SimpleName, auditRef string) error

func (ZMSClient) DeleteEntity

func (client ZMSClient) DeleteEntity(domainName DomainName, entityName EntityName, auditRef string) error

func (ZMSClient) DeleteMembership

func (client ZMSClient) DeleteMembership(domainName DomainName, roleName EntityName, memberName MemberName, auditRef string) error

func (ZMSClient) DeletePolicy

func (client ZMSClient) DeletePolicy(domainName DomainName, policyName EntityName, auditRef string) error

func (ZMSClient) DeleteProviderResourceGroupRoles

func (client ZMSClient) DeleteProviderResourceGroupRoles(tenantDomain DomainName, provDomain DomainName, provService SimpleName, resourceGroup EntityName, auditRef string) error

func (ZMSClient) DeletePublicKeyEntry

func (client ZMSClient) DeletePublicKeyEntry(domain DomainName, service SimpleName, id string, auditRef string) error

func (ZMSClient) DeleteRole

func (client ZMSClient) DeleteRole(domainName DomainName, roleName EntityName, auditRef string) error

func (ZMSClient) DeleteServiceIdentity

func (client ZMSClient) DeleteServiceIdentity(domain DomainName, service SimpleName, auditRef string) error

func (ZMSClient) DeleteSubDomain

func (client ZMSClient) DeleteSubDomain(parent DomainName, name SimpleName, auditRef string) error

func (ZMSClient) DeleteTenancy

func (client ZMSClient) DeleteTenancy(domain DomainName, service ServiceName, auditRef string) error

func (ZMSClient) DeleteTenancyResourceGroup

func (client ZMSClient) DeleteTenancyResourceGroup(domain DomainName, service ServiceName, resourceGroup EntityName, auditRef string) error

func (ZMSClient) DeleteTenantResourceGroupRoles

func (client ZMSClient) DeleteTenantResourceGroupRoles(domain DomainName, service SimpleName, tenantDomain DomainName, resourceGroup EntityName, auditRef string) error

func (ZMSClient) DeleteTenantRoles

func (client ZMSClient) DeleteTenantRoles(domain DomainName, service SimpleName, tenantDomain DomainName, auditRef string) error

func (ZMSClient) DeleteTopLevelDomain

func (client ZMSClient) DeleteTopLevelDomain(name SimpleName, auditRef string) error

func (ZMSClient) DeleteUserDomain

func (client ZMSClient) DeleteUserDomain(name SimpleName, auditRef string) error

func (ZMSClient) GetAccess

func (client ZMSClient) GetAccess(action ActionName, resource ResourceName, domain DomainName, checkPrincipal EntityName) (*Access, error)

func (ZMSClient) GetAccessExt

func (client ZMSClient) GetAccessExt(action ActionName, resource string, domain DomainName, checkPrincipal EntityName) (*Access, error)

func (ZMSClient) GetAssertion

func (client ZMSClient) GetAssertion(domainName DomainName, policyName EntityName, assertionId int64) (*Assertion, error)

func (ZMSClient) GetDomain

func (client ZMSClient) GetDomain(domain DomainName) (*Domain, error)

func (ZMSClient) GetDomainDataCheck

func (client ZMSClient) GetDomainDataCheck(domainName DomainName) (*DomainDataCheck, error)

func (ZMSClient) GetDomainList

func (client ZMSClient) GetDomainList(limit *int32, skip string, prefix string, depth *int32, account string, productId *int32, roleMember ResourceName, roleName ResourceName, modifiedSince string) (*DomainList, error)

func (ZMSClient) GetDomainTemplateList

func (client ZMSClient) GetDomainTemplateList(name DomainName) (*DomainTemplateList, error)

func (ZMSClient) GetEntity

func (client ZMSClient) GetEntity(domainName DomainName, entityName EntityName) (*Entity, error)

func (ZMSClient) GetEntityList

func (client ZMSClient) GetEntityList(domainName DomainName) (*EntityList, error)

func (ZMSClient) GetMembership

func (client ZMSClient) GetMembership(domainName DomainName, roleName EntityName, memberName MemberName) (*Membership, error)

func (ZMSClient) GetPolicies

func (client ZMSClient) GetPolicies(domainName DomainName, assertions *bool) (*Policies, error)

func (ZMSClient) GetPolicy

func (client ZMSClient) GetPolicy(domainName DomainName, policyName EntityName) (*Policy, error)

func (ZMSClient) GetPolicyList

func (client ZMSClient) GetPolicyList(domainName DomainName, limit *int32, skip string) (*PolicyList, error)

func (ZMSClient) GetProviderResourceGroupRoles

func (client ZMSClient) GetProviderResourceGroupRoles(tenantDomain DomainName, provDomain DomainName, provService SimpleName, resourceGroup EntityName) (*ProviderResourceGroupRoles, error)

func (ZMSClient) GetPublicKeyEntry

func (client ZMSClient) GetPublicKeyEntry(domain DomainName, service SimpleName, id string) (*PublicKeyEntry, error)

func (ZMSClient) GetResourceAccessList

func (client ZMSClient) GetResourceAccessList(principal EntityName, action ActionName) (*ResourceAccessList, error)

func (ZMSClient) GetRole

func (client ZMSClient) GetRole(domainName DomainName, roleName EntityName, auditLog *bool, expand *bool) (*Role, error)

func (ZMSClient) GetRoleList

func (client ZMSClient) GetRoleList(domainName DomainName, limit *int32, skip string) (*RoleList, error)

func (ZMSClient) GetRoles

func (client ZMSClient) GetRoles(domainName DomainName, members *bool) (*Roles, error)

func (ZMSClient) GetServerTemplateList

func (client ZMSClient) GetServerTemplateList() (*ServerTemplateList, error)

func (ZMSClient) GetServiceIdentities

func (client ZMSClient) GetServiceIdentities(domainName DomainName, publickeys *bool, hosts *bool) (*ServiceIdentities, error)

func (ZMSClient) GetServiceIdentity

func (client ZMSClient) GetServiceIdentity(domain DomainName, service SimpleName) (*ServiceIdentity, error)

func (ZMSClient) GetServiceIdentityList

func (client ZMSClient) GetServiceIdentityList(domainName DomainName, limit *int32, skip string) (*ServiceIdentityList, error)

func (ZMSClient) GetServicePrincipal

func (client ZMSClient) GetServicePrincipal() (*ServicePrincipal, error)

func (ZMSClient) GetSignedDomains

func (client ZMSClient) GetSignedDomains(domain DomainName, metaOnly string, matchingTag string) (*SignedDomains, string, error)

func (ZMSClient) GetTemplate

func (client ZMSClient) GetTemplate(template SimpleName) (*Template, error)

func (ZMSClient) GetTenancy

func (client ZMSClient) GetTenancy(domain DomainName, service ServiceName) (*Tenancy, error)

func (ZMSClient) GetTenantResourceGroupRoles

func (client ZMSClient) GetTenantResourceGroupRoles(domain DomainName, service SimpleName, tenantDomain DomainName, resourceGroup EntityName) (*TenantResourceGroupRoles, error)

func (ZMSClient) GetTenantRoles

func (client ZMSClient) GetTenantRoles(domain DomainName, service SimpleName, tenantDomain DomainName) (*TenantRoles, error)

func (ZMSClient) GetUserToken

func (client ZMSClient) GetUserToken(userName SimpleName, serviceNames string) (*UserToken, error)

func (ZMSClient) OptionsUserToken

func (client ZMSClient) OptionsUserToken(userName SimpleName, serviceNames string) (*UserToken, error)

func (ZMSClient) PostSubDomain

func (client ZMSClient) PostSubDomain(parent DomainName, auditRef string, detail *SubDomain) (*Domain, error)

func (ZMSClient) PostTopLevelDomain

func (client ZMSClient) PostTopLevelDomain(auditRef string, detail *TopLevelDomain) (*Domain, error)

func (ZMSClient) PostUserDomain

func (client ZMSClient) PostUserDomain(name SimpleName, auditRef string, detail *UserDomain) (*Domain, error)

func (ZMSClient) PutAssertion

func (client ZMSClient) PutAssertion(domainName DomainName, policyName EntityName, auditRef string, assertion *Assertion) (*Assertion, error)

func (ZMSClient) PutDefaultAdmins

func (client ZMSClient) PutDefaultAdmins(domainName DomainName, auditRef string, defaultAdmins *DefaultAdmins) error

func (ZMSClient) PutDomainMeta

func (client ZMSClient) PutDomainMeta(name DomainName, auditRef string, detail *DomainMeta) error

func (ZMSClient) PutDomainTemplate

func (client ZMSClient) PutDomainTemplate(name DomainName, auditRef string, template *DomainTemplate) error

func (ZMSClient) PutEntity

func (client ZMSClient) PutEntity(domainName DomainName, entityName EntityName, auditRef string, entity *Entity) error

func (ZMSClient) PutMembership

func (client ZMSClient) PutMembership(domainName DomainName, roleName EntityName, memberName MemberName, auditRef string, membership *Membership) error

func (ZMSClient) PutPolicy

func (client ZMSClient) PutPolicy(domainName DomainName, policyName EntityName, auditRef string, policy *Policy) error

func (ZMSClient) PutProviderResourceGroupRoles

func (client ZMSClient) PutProviderResourceGroupRoles(tenantDomain DomainName, provDomain DomainName, provService SimpleName, resourceGroup EntityName, auditRef string, detail *ProviderResourceGroupRoles) (*ProviderResourceGroupRoles, error)

func (ZMSClient) PutPublicKeyEntry

func (client ZMSClient) PutPublicKeyEntry(domain DomainName, service SimpleName, id string, auditRef string, publicKeyEntry *PublicKeyEntry) error

func (ZMSClient) PutRole

func (client ZMSClient) PutRole(domainName DomainName, roleName EntityName, auditRef string, role *Role) error

func (ZMSClient) PutServiceIdentity

func (client ZMSClient) PutServiceIdentity(domain DomainName, service SimpleName, auditRef string, detail *ServiceIdentity) error

func (ZMSClient) PutTenancy

func (client ZMSClient) PutTenancy(domain DomainName, service ServiceName, auditRef string, detail *Tenancy) error

func (ZMSClient) PutTenancyResourceGroup

func (client ZMSClient) PutTenancyResourceGroup(domain DomainName, service ServiceName, resourceGroup EntityName, auditRef string, detail *TenancyResourceGroup) error

func (ZMSClient) PutTenantResourceGroupRoles

func (client ZMSClient) PutTenantResourceGroupRoles(domain DomainName, service SimpleName, tenantDomain DomainName, resourceGroup EntityName, auditRef string, detail *TenantResourceGroupRoles) (*TenantResourceGroupRoles, error)

func (ZMSClient) PutTenantRoles

func (client ZMSClient) PutTenantRoles(domain DomainName, service SimpleName, tenantDomain DomainName, auditRef string, detail *TenantRoles) (*TenantRoles, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL