credentials

package
v0.0.0-...-e165f0f Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterIAMCredentialsServer

func RegisterIAMCredentialsServer(s *grpc.Server, srv IAMCredentialsServer)

Types

type GenerateAccessTokenRequest

type GenerateAccessTokenRequest struct {
	// Required. The resource name of the service account for which the credentials
	// are requested, in the following format:
	// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
	// character is required; replacing it with a project ID is invalid.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The sequence of service accounts in a delegation chain. Each service
	// account must be granted the `roles/iam.serviceAccountTokenCreator` role
	// on its next service account in the chain. The last service account in the
	// chain must be granted the `roles/iam.serviceAccountTokenCreator` role
	// on the service account that is specified in the `name` field of the
	// request.
	//
	// The delegates must have the following format:
	// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
	// character is required; replacing it with a project ID is invalid.
	Delegates []string `protobuf:"bytes,2,rep,name=delegates,proto3" json:"delegates,omitempty"`
	// Required. Code to identify the scopes to be included in the OAuth 2.0 access token.
	// See https://developers.google.com/identity/protocols/googlescopes for more
	// information.
	// At least one value required.
	Scope []string `protobuf:"bytes,4,rep,name=scope,proto3" json:"scope,omitempty"`
	// The desired lifetime duration of the access token in seconds.
	// Must be set to a value less than or equal to 3600 (1 hour). If a value is
	// not specified, the token's lifetime will be set to a default value of one
	// hour.
	Lifetime             *duration.Duration `protobuf:"bytes,7,opt,name=lifetime,proto3" json:"lifetime,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

func (*GenerateAccessTokenRequest) Descriptor

func (*GenerateAccessTokenRequest) Descriptor() ([]byte, []int)

func (*GenerateAccessTokenRequest) GetDelegates

func (m *GenerateAccessTokenRequest) GetDelegates() []string

func (*GenerateAccessTokenRequest) GetLifetime

func (m *GenerateAccessTokenRequest) GetLifetime() *duration.Duration

func (*GenerateAccessTokenRequest) GetName

func (m *GenerateAccessTokenRequest) GetName() string

func (*GenerateAccessTokenRequest) GetScope

func (m *GenerateAccessTokenRequest) GetScope() []string

func (*GenerateAccessTokenRequest) ProtoMessage

func (*GenerateAccessTokenRequest) ProtoMessage()

func (*GenerateAccessTokenRequest) Reset

func (m *GenerateAccessTokenRequest) Reset()

func (*GenerateAccessTokenRequest) String

func (m *GenerateAccessTokenRequest) String() string

func (*GenerateAccessTokenRequest) XXX_DiscardUnknown

func (m *GenerateAccessTokenRequest) XXX_DiscardUnknown()

func (*GenerateAccessTokenRequest) XXX_Marshal

func (m *GenerateAccessTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenerateAccessTokenRequest) XXX_Merge

func (m *GenerateAccessTokenRequest) XXX_Merge(src proto.Message)

func (*GenerateAccessTokenRequest) XXX_Size

func (m *GenerateAccessTokenRequest) XXX_Size() int

func (*GenerateAccessTokenRequest) XXX_Unmarshal

func (m *GenerateAccessTokenRequest) XXX_Unmarshal(b []byte) error

type GenerateAccessTokenResponse

type GenerateAccessTokenResponse struct {
	// The OAuth 2.0 access token.
	AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	// Token expiration time.
	// The expiration time is always set.
	ExpireTime           *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*GenerateAccessTokenResponse) Descriptor

func (*GenerateAccessTokenResponse) Descriptor() ([]byte, []int)

func (*GenerateAccessTokenResponse) GetAccessToken

func (m *GenerateAccessTokenResponse) GetAccessToken() string

func (*GenerateAccessTokenResponse) GetExpireTime

func (m *GenerateAccessTokenResponse) GetExpireTime() *timestamp.Timestamp

func (*GenerateAccessTokenResponse) ProtoMessage

func (*GenerateAccessTokenResponse) ProtoMessage()

func (*GenerateAccessTokenResponse) Reset

func (m *GenerateAccessTokenResponse) Reset()

func (*GenerateAccessTokenResponse) String

func (m *GenerateAccessTokenResponse) String() string

func (*GenerateAccessTokenResponse) XXX_DiscardUnknown

func (m *GenerateAccessTokenResponse) XXX_DiscardUnknown()

func (*GenerateAccessTokenResponse) XXX_Marshal

func (m *GenerateAccessTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenerateAccessTokenResponse) XXX_Merge

func (m *GenerateAccessTokenResponse) XXX_Merge(src proto.Message)

func (*GenerateAccessTokenResponse) XXX_Size

func (m *GenerateAccessTokenResponse) XXX_Size() int

func (*GenerateAccessTokenResponse) XXX_Unmarshal

func (m *GenerateAccessTokenResponse) XXX_Unmarshal(b []byte) error

type GenerateIdTokenRequest

type GenerateIdTokenRequest struct {
	// Required. The resource name of the service account for which the credentials
	// are requested, in the following format:
	// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
	// character is required; replacing it with a project ID is invalid.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The sequence of service accounts in a delegation chain. Each service
	// account must be granted the `roles/iam.serviceAccountTokenCreator` role
	// on its next service account in the chain. The last service account in the
	// chain must be granted the `roles/iam.serviceAccountTokenCreator` role
	// on the service account that is specified in the `name` field of the
	// request.
	//
	// The delegates must have the following format:
	// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
	// character is required; replacing it with a project ID is invalid.
	Delegates []string `protobuf:"bytes,2,rep,name=delegates,proto3" json:"delegates,omitempty"`
	// Required. The audience for the token, such as the API or account that this token
	// grants access to.
	Audience string `protobuf:"bytes,3,opt,name=audience,proto3" json:"audience,omitempty"`
	// Include the service account email in the token. If set to `true`, the
	// token will contain `email` and `email_verified` claims.
	IncludeEmail         bool     `protobuf:"varint,4,opt,name=include_email,json=includeEmail,proto3" json:"include_email,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GenerateIdTokenRequest) Descriptor

func (*GenerateIdTokenRequest) Descriptor() ([]byte, []int)

func (*GenerateIdTokenRequest) GetAudience

func (m *GenerateIdTokenRequest) GetAudience() string

func (*GenerateIdTokenRequest) GetDelegates

func (m *GenerateIdTokenRequest) GetDelegates() []string

func (*GenerateIdTokenRequest) GetIncludeEmail

func (m *GenerateIdTokenRequest) GetIncludeEmail() bool

func (*GenerateIdTokenRequest) GetName

func (m *GenerateIdTokenRequest) GetName() string

func (*GenerateIdTokenRequest) ProtoMessage

func (*GenerateIdTokenRequest) ProtoMessage()

func (*GenerateIdTokenRequest) Reset

func (m *GenerateIdTokenRequest) Reset()

func (*GenerateIdTokenRequest) String

func (m *GenerateIdTokenRequest) String() string

func (*GenerateIdTokenRequest) XXX_DiscardUnknown

func (m *GenerateIdTokenRequest) XXX_DiscardUnknown()

func (*GenerateIdTokenRequest) XXX_Marshal

func (m *GenerateIdTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenerateIdTokenRequest) XXX_Merge

func (m *GenerateIdTokenRequest) XXX_Merge(src proto.Message)

func (*GenerateIdTokenRequest) XXX_Size

func (m *GenerateIdTokenRequest) XXX_Size() int

func (*GenerateIdTokenRequest) XXX_Unmarshal

func (m *GenerateIdTokenRequest) XXX_Unmarshal(b []byte) error

type GenerateIdTokenResponse

type GenerateIdTokenResponse struct {
	// The OpenId Connect ID token.
	Token                string   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GenerateIdTokenResponse) Descriptor

func (*GenerateIdTokenResponse) Descriptor() ([]byte, []int)

func (*GenerateIdTokenResponse) GetToken

func (m *GenerateIdTokenResponse) GetToken() string

func (*GenerateIdTokenResponse) ProtoMessage

func (*GenerateIdTokenResponse) ProtoMessage()

func (*GenerateIdTokenResponse) Reset

func (m *GenerateIdTokenResponse) Reset()

func (*GenerateIdTokenResponse) String

func (m *GenerateIdTokenResponse) String() string

func (*GenerateIdTokenResponse) XXX_DiscardUnknown

func (m *GenerateIdTokenResponse) XXX_DiscardUnknown()

func (*GenerateIdTokenResponse) XXX_Marshal

func (m *GenerateIdTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenerateIdTokenResponse) XXX_Merge

func (m *GenerateIdTokenResponse) XXX_Merge(src proto.Message)

func (*GenerateIdTokenResponse) XXX_Size

func (m *GenerateIdTokenResponse) XXX_Size() int

func (*GenerateIdTokenResponse) XXX_Unmarshal

func (m *GenerateIdTokenResponse) XXX_Unmarshal(b []byte) error

type IAMCredentialsClient

type IAMCredentialsClient interface {
	// Generates an OAuth 2.0 access token for a service account.
	GenerateAccessToken(ctx context.Context, in *GenerateAccessTokenRequest, opts ...grpc.CallOption) (*GenerateAccessTokenResponse, error)
	// Generates an OpenID Connect ID token for a service account.
	GenerateIdToken(ctx context.Context, in *GenerateIdTokenRequest, opts ...grpc.CallOption) (*GenerateIdTokenResponse, error)
	// Signs a blob using a service account's system-managed private key.
	SignBlob(ctx context.Context, in *SignBlobRequest, opts ...grpc.CallOption) (*SignBlobResponse, error)
	// Signs a JWT using a service account's system-managed private key.
	SignJwt(ctx context.Context, in *SignJwtRequest, opts ...grpc.CallOption) (*SignJwtResponse, error)
}

IAMCredentialsClient is the client API for IAMCredentials service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type IAMCredentialsServer

type IAMCredentialsServer interface {
	// Generates an OAuth 2.0 access token for a service account.
	GenerateAccessToken(context.Context, *GenerateAccessTokenRequest) (*GenerateAccessTokenResponse, error)
	// Generates an OpenID Connect ID token for a service account.
	GenerateIdToken(context.Context, *GenerateIdTokenRequest) (*GenerateIdTokenResponse, error)
	// Signs a blob using a service account's system-managed private key.
	SignBlob(context.Context, *SignBlobRequest) (*SignBlobResponse, error)
	// Signs a JWT using a service account's system-managed private key.
	SignJwt(context.Context, *SignJwtRequest) (*SignJwtResponse, error)
}

IAMCredentialsServer is the server API for IAMCredentials service.

type SignBlobRequest

type SignBlobRequest struct {
	// Required. The resource name of the service account for which the credentials
	// are requested, in the following format:
	// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
	// character is required; replacing it with a project ID is invalid.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The sequence of service accounts in a delegation chain. Each service
	// account must be granted the `roles/iam.serviceAccountTokenCreator` role
	// on its next service account in the chain. The last service account in the
	// chain must be granted the `roles/iam.serviceAccountTokenCreator` role
	// on the service account that is specified in the `name` field of the
	// request.
	//
	// The delegates must have the following format:
	// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
	// character is required; replacing it with a project ID is invalid.
	Delegates []string `protobuf:"bytes,3,rep,name=delegates,proto3" json:"delegates,omitempty"`
	// Required. The bytes to sign.
	Payload              []byte   `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SignBlobRequest) Descriptor

func (*SignBlobRequest) Descriptor() ([]byte, []int)

func (*SignBlobRequest) GetDelegates

func (m *SignBlobRequest) GetDelegates() []string

func (*SignBlobRequest) GetName

func (m *SignBlobRequest) GetName() string

func (*SignBlobRequest) GetPayload

func (m *SignBlobRequest) GetPayload() []byte

func (*SignBlobRequest) ProtoMessage

func (*SignBlobRequest) ProtoMessage()

func (*SignBlobRequest) Reset

func (m *SignBlobRequest) Reset()

func (*SignBlobRequest) String

func (m *SignBlobRequest) String() string

func (*SignBlobRequest) XXX_DiscardUnknown

func (m *SignBlobRequest) XXX_DiscardUnknown()

func (*SignBlobRequest) XXX_Marshal

func (m *SignBlobRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignBlobRequest) XXX_Merge

func (m *SignBlobRequest) XXX_Merge(src proto.Message)

func (*SignBlobRequest) XXX_Size

func (m *SignBlobRequest) XXX_Size() int

func (*SignBlobRequest) XXX_Unmarshal

func (m *SignBlobRequest) XXX_Unmarshal(b []byte) error

type SignBlobResponse

type SignBlobResponse struct {
	// The ID of the key used to sign the blob.
	KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
	// The signed blob.
	SignedBlob           []byte   `protobuf:"bytes,4,opt,name=signed_blob,json=signedBlob,proto3" json:"signed_blob,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SignBlobResponse) Descriptor

func (*SignBlobResponse) Descriptor() ([]byte, []int)

func (*SignBlobResponse) GetKeyId

func (m *SignBlobResponse) GetKeyId() string

func (*SignBlobResponse) GetSignedBlob

func (m *SignBlobResponse) GetSignedBlob() []byte

func (*SignBlobResponse) ProtoMessage

func (*SignBlobResponse) ProtoMessage()

func (*SignBlobResponse) Reset

func (m *SignBlobResponse) Reset()

func (*SignBlobResponse) String

func (m *SignBlobResponse) String() string

func (*SignBlobResponse) XXX_DiscardUnknown

func (m *SignBlobResponse) XXX_DiscardUnknown()

func (*SignBlobResponse) XXX_Marshal

func (m *SignBlobResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignBlobResponse) XXX_Merge

func (m *SignBlobResponse) XXX_Merge(src proto.Message)

func (*SignBlobResponse) XXX_Size

func (m *SignBlobResponse) XXX_Size() int

func (*SignBlobResponse) XXX_Unmarshal

func (m *SignBlobResponse) XXX_Unmarshal(b []byte) error

type SignJwtRequest

type SignJwtRequest struct {
	// Required. The resource name of the service account for which the credentials
	// are requested, in the following format:
	// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
	// character is required; replacing it with a project ID is invalid.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The sequence of service accounts in a delegation chain. Each service
	// account must be granted the `roles/iam.serviceAccountTokenCreator` role
	// on its next service account in the chain. The last service account in the
	// chain must be granted the `roles/iam.serviceAccountTokenCreator` role
	// on the service account that is specified in the `name` field of the
	// request.
	//
	// The delegates must have the following format:
	// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
	// character is required; replacing it with a project ID is invalid.
	Delegates []string `protobuf:"bytes,3,rep,name=delegates,proto3" json:"delegates,omitempty"`
	// Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set.
	Payload              string   `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SignJwtRequest) Descriptor

func (*SignJwtRequest) Descriptor() ([]byte, []int)

func (*SignJwtRequest) GetDelegates

func (m *SignJwtRequest) GetDelegates() []string

func (*SignJwtRequest) GetName

func (m *SignJwtRequest) GetName() string

func (*SignJwtRequest) GetPayload

func (m *SignJwtRequest) GetPayload() string

func (*SignJwtRequest) ProtoMessage

func (*SignJwtRequest) ProtoMessage()

func (*SignJwtRequest) Reset

func (m *SignJwtRequest) Reset()

func (*SignJwtRequest) String

func (m *SignJwtRequest) String() string

func (*SignJwtRequest) XXX_DiscardUnknown

func (m *SignJwtRequest) XXX_DiscardUnknown()

func (*SignJwtRequest) XXX_Marshal

func (m *SignJwtRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignJwtRequest) XXX_Merge

func (m *SignJwtRequest) XXX_Merge(src proto.Message)

func (*SignJwtRequest) XXX_Size

func (m *SignJwtRequest) XXX_Size() int

func (*SignJwtRequest) XXX_Unmarshal

func (m *SignJwtRequest) XXX_Unmarshal(b []byte) error

type SignJwtResponse

type SignJwtResponse struct {
	// The ID of the key used to sign the JWT.
	KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
	// The signed JWT.
	SignedJwt            string   `protobuf:"bytes,2,opt,name=signed_jwt,json=signedJwt,proto3" json:"signed_jwt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SignJwtResponse) Descriptor

func (*SignJwtResponse) Descriptor() ([]byte, []int)

func (*SignJwtResponse) GetKeyId

func (m *SignJwtResponse) GetKeyId() string

func (*SignJwtResponse) GetSignedJwt

func (m *SignJwtResponse) GetSignedJwt() string

func (*SignJwtResponse) ProtoMessage

func (*SignJwtResponse) ProtoMessage()

func (*SignJwtResponse) Reset

func (m *SignJwtResponse) Reset()

func (*SignJwtResponse) String

func (m *SignJwtResponse) String() string

func (*SignJwtResponse) XXX_DiscardUnknown

func (m *SignJwtResponse) XXX_DiscardUnknown()

func (*SignJwtResponse) XXX_Marshal

func (m *SignJwtResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignJwtResponse) XXX_Merge

func (m *SignJwtResponse) XXX_Merge(src proto.Message)

func (*SignJwtResponse) XXX_Size

func (m *SignJwtResponse) XXX_Size() int

func (*SignJwtResponse) XXX_Unmarshal

func (m *SignJwtResponse) XXX_Unmarshal(b []byte) error

type UnimplementedIAMCredentialsServer

type UnimplementedIAMCredentialsServer struct {
}

UnimplementedIAMCredentialsServer can be embedded to have forward compatible implementations.

func (*UnimplementedIAMCredentialsServer) GenerateAccessToken

func (*UnimplementedIAMCredentialsServer) GenerateIdToken

func (*UnimplementedIAMCredentialsServer) SignBlob

func (*UnimplementedIAMCredentialsServer) SignJwt

Jump to

Keyboard shortcuts

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