Create a workload identity issuer
curl --request POST \
--url https://api.onkernel.com/org/workload_identity_issuers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "",
"enabled": false,
"issuer_url": "<string>",
"token_validation": {
"max_lifetime_seconds": 43200
}
}
'import requests
url = "https://api.onkernel.com/org/workload_identity_issuers"
payload = {
"name": "<string>",
"description": "",
"enabled": False,
"issuer_url": "<string>",
"token_validation": { "max_lifetime_seconds": 43200 }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '',
enabled: false,
issuer_url: '<string>',
token_validation: {max_lifetime_seconds: 43200}
})
};
fetch('https://api.onkernel.com/org/workload_identity_issuers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onkernel.com/org/workload_identity_issuers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '',
'enabled' => false,
'issuer_url' => '<string>',
'token_validation' => [
'max_lifetime_seconds' => 43200
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.onkernel.com/org/workload_identity_issuers"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"enabled\": false,\n \"issuer_url\": \"<string>\",\n \"token_validation\": {\n \"max_lifetime_seconds\": 43200\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.onkernel.com/org/workload_identity_issuers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"enabled\": false,\n \"issuer_url\": \"<string>\",\n \"token_validation\": {\n \"max_lifetime_seconds\": 43200\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onkernel.com/org/workload_identity_issuers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"enabled\": false,\n \"issuer_url\": \"<string>\",\n \"token_validation\": {\n \"max_lifetime_seconds\": 43200\n }\n}"
response = http.request(request)
puts response.read_body{
"archived_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"description": "",
"enabled": false,
"id": "<string>",
"issuer_url": "<string>",
"jwks": {
"type": "discovery",
"ca_cert_pem": "<string>",
"discovery_base_url": "<string>",
"keys": [
{}
],
"url": "<string>"
},
"name": "<string>",
"org_id": "<string>",
"preset_type": "github_actions",
"security_version": 2,
"token_validation": {
"max_lifetime_seconds": 43200,
"replay_protection": "single_use"
},
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}Workload Identity
Create a workload identity issuer
Organization credential administrators only. No external namespace-ownership or staff approval is required. New trust resources default disabled.
POST
/
org
/
workload_identity_issuers
Create a workload identity issuer
curl --request POST \
--url https://api.onkernel.com/org/workload_identity_issuers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "",
"enabled": false,
"issuer_url": "<string>",
"token_validation": {
"max_lifetime_seconds": 43200
}
}
'import requests
url = "https://api.onkernel.com/org/workload_identity_issuers"
payload = {
"name": "<string>",
"description": "",
"enabled": False,
"issuer_url": "<string>",
"token_validation": { "max_lifetime_seconds": 43200 }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '',
enabled: false,
issuer_url: '<string>',
token_validation: {max_lifetime_seconds: 43200}
})
};
fetch('https://api.onkernel.com/org/workload_identity_issuers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onkernel.com/org/workload_identity_issuers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '',
'enabled' => false,
'issuer_url' => '<string>',
'token_validation' => [
'max_lifetime_seconds' => 43200
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.onkernel.com/org/workload_identity_issuers"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"enabled\": false,\n \"issuer_url\": \"<string>\",\n \"token_validation\": {\n \"max_lifetime_seconds\": 43200\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.onkernel.com/org/workload_identity_issuers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"enabled\": false,\n \"issuer_url\": \"<string>\",\n \"token_validation\": {\n \"max_lifetime_seconds\": 43200\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onkernel.com/org/workload_identity_issuers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"enabled\": false,\n \"issuer_url\": \"<string>\",\n \"token_validation\": {\n \"max_lifetime_seconds\": 43200\n }\n}"
response = http.request(request)
puts response.read_body{
"archived_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"description": "",
"enabled": false,
"id": "<string>",
"issuer_url": "<string>",
"jwks": {
"type": "discovery",
"ca_cert_pem": "<string>",
"discovery_base_url": "<string>",
"keys": [
{}
],
"url": "<string>"
},
"name": "<string>",
"org_id": "<string>",
"preset_type": "github_actions",
"security_version": 2,
"token_validation": {
"max_lifetime_seconds": 43200,
"replay_protection": "single_use"
},
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}Authorizations
Body
application/json
The kind of identity provider. GitHub Actions, Google Cloud and Microsoft Entra issuers are recognized by their issuer URL and must use their own type. Defaults to the type the issuer URL belongs to, or custom_oidc.
Available options:
github_actions, aws, google_cloud, microsoft_entra, kubernetes, custom_oidc Response
Created
The kind of identity provider. GitHub Actions, Google Cloud and Microsoft Entra issuers are recognized by their issuer URL and must use their own type. Defaults to the type the issuer URL belongs to, or custom_oidc.
Available options:
github_actions, aws, google_cloud, microsoft_entra, kubernetes, custom_oidc