Oidc-ID-Token

This contains APIs related to OIDC ID Token generation as defined in Harness

Generates an OIDC ID Token for GCP

Securityx-api-key
Request
Request Body schema:
required

Details of GCP Workload Identity

accountId
required
string

This specifies the Harness Account Id

workloadPoolId
required
string

This specifies the Workload Pool Id

providerId
required
string

This specifies the OIDC ID Provider

gcpProjectId
required
string

This specifies the GCP Project Id

serviceAccountEmail
string

This specifies the GCP Service Account Email

object (OidcIdTokenCustomAttributesStructure)

This includes all the ID token custom attributes

Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Returns OIDC ID Token as a JWT

post/ng/api/oidc/id-token/gcp
Request samples
{
  • "accountId": "string",
  • "workloadPoolId": "string",
  • "providerId": "string",
  • "gcpProjectId": "string",
  • "serviceAccountEmail": "string",
  • "oidcIdTokenCustomAttributesStructure": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Generates an OIDC ID Token for GCP

Securityx-api-key
Request
Request Body schema:
required

Details of GCP Workload Identity

accountId
required
string

This specifies the Harness Account Id

workloadPoolId
required
string

This specifies the Workload Pool Id

providerId
required
string

This specifies the OIDC ID Provider

gcpProjectId
required
string

This specifies the GCP Project Id

serviceAccountEmail
string

This specifies the GCP Service Account Email

object (OidcIdTokenCustomAttributesStructure)

This includes all the ID token custom attributes

Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Returns OIDC ID Token as a JWT

post/ng/api/oidc/id-token/gcp-v2
Request samples
{
  • "accountId": "string",
  • "workloadPoolId": "string",
  • "providerId": "string",
  • "gcpProjectId": "string",
  • "serviceAccountEmail": "string",
  • "oidcIdTokenCustomAttributesStructure": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Generate a custom OIDC ID Token

Securityx-api-key
Request
Request Body schema:
required

contains oidc fields for custom token

accountId
string

This specifies the Harness Account Id

required
object (OidcIdTokenCustomAttributesStructure)

This includes all the ID token custom attributes

sub
string

This overrides the default subject field in ID token

aud
required
string

This specifies the audience field in ID token

Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Returns OIDC ID Token as a JWT

post/ng/api/oidc/id-token/custom
Request samples
{
  • "accountId": "string",
  • "oidcIdTokenCustomAttributesStructure": {
    },
  • "sub": "string",
  • "aud": "string"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Generates an OIDC ID Token for AWS

Securityx-api-key
Request
Request Body schema:
required

contains oidc fields for aws

accountId
string

This specifies the Harness Account Id

object (OidcIdTokenCustomAttributesStructure)

This includes all the ID token custom attributes

Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Returns OIDC ID Token as a JWT

post/ng/api/oidc/id-token/aws
Request samples
{
  • "accountId": "string",
  • "oidcIdTokenCustomAttributesStructure": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}