From f224fb4e65fc796e1b20f9577e6c3dfb06af02a1 Mon Sep 17 00:00:00 2001 From: Meenakshi Raikwar <meenakshi.raikwar@harness.io> Date: Tue, 14 Jan 2025 13:20:30 +0530 Subject: [PATCH 1/3] feat: [PL-58649]: Added JWT auth config in VaultConnector --- harness/cd/unpublished/types.go | 3 +++ harness/nextgen/docs/VaultConnector.md | 3 +++ harness/nextgen/model_vault_connector.go | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/harness/cd/unpublished/types.go b/harness/cd/unpublished/types.go index 36417e2f..a511426d 100644 --- a/harness/cd/unpublished/types.go +++ b/harness/cd/unpublished/types.go @@ -60,6 +60,9 @@ type SecretManager struct { KeyName string `json:"keyName,omitempty"` Credentials string `json:"credentials,omitempty"` UsePutSecret bool `json:"usePutSecret,omitempty"` + UseJwtAuth bool `json:"useJwtAuth,omitempty"` + JwtAuthRole string `json:"jwtAuthRole,omitempty"` + JwtAuthPath string `json:"jwtAuthPath,omitempty"` } type User struct { diff --git a/harness/nextgen/docs/VaultConnector.md b/harness/nextgen/docs/VaultConnector.md index 02973b28..bed1b1bb 100644 --- a/harness/nextgen/docs/VaultConnector.md +++ b/harness/nextgen/docs/VaultConnector.md @@ -21,6 +21,9 @@ Name | Type | Description | Notes **Default_** | **bool** | | [optional] [default to null] **AccessType** | **string** | | [optional] [default to null] **ReadOnly** | **bool** | | [optional] [default to null] +**UseJwtAuth** | **bool** | | [optional] [default to false] +**JwtAuthRole** | **string** | | [optional] [default to null] +**JwtAuthPath** | **string** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/harness/nextgen/model_vault_connector.go b/harness/nextgen/model_vault_connector.go index d51badd7..990dc962 100644 --- a/harness/nextgen/model_vault_connector.go +++ b/harness/nextgen/model_vault_connector.go @@ -61,4 +61,10 @@ type VaultConnector struct { AccessType string `json:"accessType,omitempty"` Default_ bool `json:"default,omitempty"` ReadOnly bool `json:"readOnly,omitempty"` + // Boolean value to indicate if JWT Auth is used for authentication. + UseJwtAuth bool `json:"useJwtAuth,omitempty"` + // This is the role name which is created to perform JWT auth method. + JwtAuthRole string `json:"jwtAuthRole,omitempty"` + // This specifies mount path where JWT auth method is enabled. + JwtAuthPath string `json:"jwtAuthPath,omitempty"` } From 64899be41dc0fdf79467c7e09b5aa57ca8cd16e4 Mon Sep 17 00:00:00 2001 From: Meenakshi Raikwar <meenakshi.raikwar@harness.io> Date: Tue, 14 Jan 2025 22:03:02 +0530 Subject: [PATCH 2/3] feat: [PL-58649]: execute on delegate changes --- harness/cd/unpublished/types.go | 1 + harness/nextgen/docs/VaultConnector.md | 1 + harness/nextgen/model_vault_connector.go | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/harness/cd/unpublished/types.go b/harness/cd/unpublished/types.go index 8ff69e8c..106af917 100644 --- a/harness/cd/unpublished/types.go +++ b/harness/cd/unpublished/types.go @@ -65,6 +65,7 @@ type SecretManager struct { UseJwtAuth bool `json:"useJwtAuth,omitempty"` JwtAuthRole string `json:"jwtAuthRole,omitempty"` JwtAuthPath string `json:"jwtAuthPath,omitempty"` + ExecuteOnDelegate bool `json:"executeOnDelegate,omitempty"` } type User struct { diff --git a/harness/nextgen/docs/VaultConnector.md b/harness/nextgen/docs/VaultConnector.md index bed1b1bb..3a8dc6cd 100644 --- a/harness/nextgen/docs/VaultConnector.md +++ b/harness/nextgen/docs/VaultConnector.md @@ -24,6 +24,7 @@ Name | Type | Description | Notes **UseJwtAuth** | **bool** | | [optional] [default to false] **JwtAuthRole** | **string** | | [optional] [default to null] **JwtAuthPath** | **string** | | [optional] [default to null] +**ExecuteOnDelegate** | **bool** | | [optional] [default to true] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/harness/nextgen/model_vault_connector.go b/harness/nextgen/model_vault_connector.go index 990dc962..b52a6667 100644 --- a/harness/nextgen/model_vault_connector.go +++ b/harness/nextgen/model_vault_connector.go @@ -66,5 +66,6 @@ type VaultConnector struct { // This is the role name which is created to perform JWT auth method. JwtAuthRole string `json:"jwtAuthRole,omitempty"` // This specifies mount path where JWT auth method is enabled. - JwtAuthPath string `json:"jwtAuthPath,omitempty"` + JwtAuthPath string `json:"jwtAuthPath,omitempty"` + ExecuteOnDelegate bool `json:"executeOnDelegate,omitempty"` } From bc4d0e19798e0bd86d9f6e9842d69ccbd168d7db Mon Sep 17 00:00:00 2001 From: meenakshi-harness <meenakshi.raikwar@harness.io> Date: Thu, 23 Jan 2025 16:24:10 +0530 Subject: [PATCH 3/3] updates --- harness/cd/unpublished/types.go | 2 +- harness/nextgen/model_vault_connector.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/harness/cd/unpublished/types.go b/harness/cd/unpublished/types.go index 106af917..6ac8d2ab 100644 --- a/harness/cd/unpublished/types.go +++ b/harness/cd/unpublished/types.go @@ -65,7 +65,7 @@ type SecretManager struct { UseJwtAuth bool `json:"useJwtAuth,omitempty"` JwtAuthRole string `json:"jwtAuthRole,omitempty"` JwtAuthPath string `json:"jwtAuthPath,omitempty"` - ExecuteOnDelegate bool `json:"executeOnDelegate,omitempty"` + ExecuteOnDelegate bool `json:"executeOnDelegate"` } type User struct { diff --git a/harness/nextgen/model_vault_connector.go b/harness/nextgen/model_vault_connector.go index b52a6667..fd6dc423 100644 --- a/harness/nextgen/model_vault_connector.go +++ b/harness/nextgen/model_vault_connector.go @@ -67,5 +67,5 @@ type VaultConnector struct { JwtAuthRole string `json:"jwtAuthRole,omitempty"` // This specifies mount path where JWT auth method is enabled. JwtAuthPath string `json:"jwtAuthPath,omitempty"` - ExecuteOnDelegate bool `json:"executeOnDelegate,omitempty"` + ExecuteOnDelegate bool `json:"executeOnDelegate"` }