From 167c4b35a0cf791c344822b65fc7ae950f761d53 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Tue, 7 Jan 2025 20:58:47 +0600 Subject: [PATCH] Add ca bundle to inbox token request api (#527) Signed-off-by: Tamal Saha --- apis/identity/v1alpha1/inboxtokenrequest_types.go | 1 + apis/identity/v1alpha1/openapi_generated.go | 6 ++++++ pkg/identity/b3.go | 1 + 3 files changed, 8 insertions(+) diff --git a/apis/identity/v1alpha1/inboxtokenrequest_types.go b/apis/identity/v1alpha1/inboxtokenrequest_types.go index 51bd5a1a6..b5032e083 100644 --- a/apis/identity/v1alpha1/inboxtokenrequest_types.go +++ b/apis/identity/v1alpha1/inboxtokenrequest_types.go @@ -46,6 +46,7 @@ type InboxTokenRequestRequest struct{} type InboxTokenRequestResponse struct { AgentJWTToken string `json:"agentJwtToken"` + CABundle string `json:"caBundle,omitempty"` } func init() { diff --git a/apis/identity/v1alpha1/openapi_generated.go b/apis/identity/v1alpha1/openapi_generated.go index 2338a46b4..128b7bb28 100644 --- a/apis/identity/v1alpha1/openapi_generated.go +++ b/apis/identity/v1alpha1/openapi_generated.go @@ -19092,6 +19092,12 @@ func schema_resource_metadata_apis_identity_v1alpha1_InboxTokenRequestResponse(r Format: "", }, }, + "caBundle": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, }, Required: []string{"agentJwtToken"}, }, diff --git a/pkg/identity/b3.go b/pkg/identity/b3.go index c2195b25a..b58da638f 100644 --- a/pkg/identity/b3.go +++ b/pkg/identity/b3.go @@ -195,6 +195,7 @@ func (c *Client) GetToken() (*identityapi.InboxTokenRequestResponse, error) { if err = json.Unmarshal(body, tokenResponse); err != nil { return nil, err } + tokenResponse.CABundle = string(c.caCert) return tokenResponse, nil }