serviceaccounts

package
v2.124.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteOIDCIdentityByID

func DeleteOIDCIdentityByID(client newclient.Client, serviceAccountID string, ID string) error

DeleteOIDCIdentityByID remove an OIDC identity by ID for the provided service account ID

func GetOIDCIdentities

func GetOIDCIdentities(client newclient.Client, query OIDCIdentityQuery) (*resources.Resources[*OIDCIdentity], error)

GetOIDCIdentities queries all OIDC identities for the provided service account ID

func UpdateOIDCIdentity

func UpdateOIDCIdentity(client newclient.Client, identity *OIDCIdentity) error

UpdateOIDCIdentity will update the OIDC identity, update does not return the updated OIDC identity

Types

type OIDCIdentity

type OIDCIdentity struct {
	Audience         string `json:"Audience,omitempty"`
	Issuer           string `json:"Issuer"`
	Name             string `json:"Name"`
	ServiceAccountID string `json:"ServiceAccountId"`
	Subject          string `json:"Subject"`

	// ClaimConditions has no omitempty on purpose.
	// On update, a nil slice is sent as null and Octopus keeps the existing conditions.
	// An empty slice is sent as [] and Octopus removes them.
	ClaimConditions []OIDCIdentityClaimCondition `json:"ClaimConditions"`
	resources.Resource
}

func AddOIDCIdentity

func AddOIDCIdentity(client newclient.Client, identity *OIDCIdentity) (*OIDCIdentity, error)

AddOIDCIdentity creates a new OIDC Identity for the service account

func GetOIDCIdentityByID

func GetOIDCIdentityByID(client newclient.Client, serviceAccountID string, ID string) (*OIDCIdentity, error)

GetOIDCIdentityByID queries OIDC identities by ID for the provided service account ID

func NewOIDCIdentity

func NewOIDCIdentity(serviceAccountID string, name string, issuer string, subject string) *OIDCIdentity

NewOIDCIdentity initializes a Service Account with required fields.

type OIDCIdentityClaimCondition added in v2.123.0

type OIDCIdentityClaimCondition struct {
	Claim  string   `json:"Claim"`
	Values []string `json:"Values"`
}

OIDCIdentityClaimCondition is a condition a token claim must pass before Octopus exchanges the token for an access token. The token passes the condition when its claim matches any one of the values. Values support the same wildcards as the subject.

type OIDCIdentityQuery

type OIDCIdentityQuery struct {
	ServiceAccountId string `uri:"serviceAccountId" url:"serviceAccountId"`
	Skip             int    `uri:"skip" url:"skip"`
	Take             int    `uri:"take" url:"take"`
}

type ServiceAccountOIDCIdentitiesResponse added in v2.105.0

type ServiceAccountOIDCIdentitiesResponse struct {
	ServerUrl      string          `json:"ServerUrl"`
	ExternalId     string          `json:"ExternalId"`
	OidcIdentities []*OIDCIdentity `json:"OidcIdentities"`
	Count          int             `json:"Count"`
}

func GetServiceAccountOIDCData added in v2.105.0

func GetServiceAccountOIDCData(client newclient.Client, query OIDCIdentityQuery) (*ServiceAccountOIDCIdentitiesResponse, error)

GetServiceAccountOIDCData queries the service account and identities for the provided service account ID

Jump to

Keyboard shortcuts

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