Skip to main content

open_id_connects

Creates, updates, deletes, gets or lists an open_id_connects resource.

Overview​

Nameopen_id_connects
TypeResource
Idovh.cloud_kube.open_id_connects

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
client_idstringClient ID (wire: clientId)
ca_contentstringContent of the certificate for the CA, in base64 format, that signed your identity provider's web certificate. Defaults to the host's root CAs. (wire: caContent)
groups_claimarrayJWT claim to use as the user's group. If the claim is present it must be an array of strings. (wire: groupsClaim)
groups_prefixstringPrefix prepended to group claims to prevent clashes with existing names (such as system: groups). For example, the value oidc: will create group names like oidc:engineering and oidc:infra. (wire: groupsPrefix)
issuer_urlstringIssuer URL (wire: issuerUrl)
required_claimarraykey=value pairs that describe required claims in the ID Token. If set, the claims are verified to be present in the ID Token with a matching value. (wire: requiredClaim)
signing_algorithmsarrayThe signing algorithms accepted. Default is "RS256". (wire: signingAlgorithms)
username_claimstringJWT claim to use as the user name. By default sub, which is expected to be a unique identifier of the end user. Admins can choose other claims, such as email or name, depending on their provider. However, claims other than email will be prefixed with the issuer URL to prevent naming clashes with other plugins. (wire: usernameClaim)
username_prefixstringPrefix prepended to username claims to prevent clashes with existing names (such as system: users). For example, the value oidc: will create usernames like oidc:jane.doe. If this field isn't set and oidcUsernameClaim is a value other than email the prefix defaults to ( Issuer URL )# where ( Issuer URL ) is the value of oidcIssuerUrl. The value - can be used to disable all prefixing. (wire: usernamePrefix)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectkube_id, service_nameGet openIdConnect integration parameters
createinsertkube_id, service_name, client_id, issuer_urlConfigure APIServer for OpenIdConnect
updateupdatekube_id, service_nameUpdate parameters and reconfigure APIServer
deletedeletekube_id, service_nameRemove OpenIdConnect integration from APIServer

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
kube_idstringKube ID (wire: kubeId)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.

SELECT examples​

Get openIdConnect integration parameters

SELECT
client_id,
ca_content,
groups_claim,
groups_prefix,
issuer_url,
required_claim,
signing_algorithms,
username_claim,
username_prefix
FROM ovh.cloud_kube.open_id_connects
WHERE kube_id = '{{ kube_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Configure APIServer for OpenIdConnect

INSERT INTO ovh.cloud_kube.open_id_connects (
ca_content,
client_id,
groups_claim,
groups_prefix,
issuer_url,
required_claim,
signing_algorithms,
username_claim,
username_prefix,
kube_id,
service_name
)
SELECT
'{{ ca_content }}',
'{{ client_id }}' /* required */,
'{{ groups_claim }}',
'{{ groups_prefix }}',
'{{ issuer_url }}' /* required */,
'{{ required_claim }}',
'{{ signing_algorithms }}',
'{{ username_claim }}',
'{{ username_prefix }}',
'{{ kube_id }}',
'{{ service_name }}'
RETURNING
client_id,
ca_content,
groups_claim,
groups_prefix,
issuer_url,
required_claim,
signing_algorithms,
username_claim,
username_prefix
;

UPDATE examples​

Update parameters and reconfigure APIServer

UPDATE ovh.cloud_kube.open_id_connects
SET
ca_content = '{{ ca_content }}',
client_id = '{{ client_id }}',
groups_claim = '{{ groups_claim }}',
groups_prefix = '{{ groups_prefix }}',
issuer_url = '{{ issuer_url }}',
required_claim = '{{ required_claim }}',
signing_algorithms = '{{ signing_algorithms }}',
username_claim = '{{ username_claim }}',
username_prefix = '{{ username_prefix }}'
WHERE
kube_id = '{{ kube_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set;

DELETE examples​

Remove OpenIdConnect integration from APIServer

DELETE FROM ovh.cloud_kube.open_id_connects
WHERE kube_id = '{{ kube_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;