-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DatabaseAuthenticationConfig and other changes for improved passw…
…ordless db configuration (#40)
- Loading branch information
Showing
9 changed files
with
120 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: ENHANCEMENTS | ||
body: 'targets/database: Add new field DatabaseAuthenticationConfig and deprecate | ||
SplitCert and DatabaseType' | ||
time: 2023-10-11T12:27:38.297052484-05:00 | ||
custom: | ||
Issues: "40" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
kind: FEATURES | ||
body: 'targets/database: Add support for GET list of database authentication configs' | ||
time: 2023-10-06T13:57:21.309141752-05:00 | ||
custom: | ||
Issues: "40" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
bastionzero/service/targets/dbauthconfig/authenticationtype.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package dbauthconfig | ||
|
||
// These constants represent the supported values for the AuthenticationType field in DatabaseAuthenticationConfig. | ||
const ( | ||
Default string = "Default" | ||
SplitCert string = "SplitCert" | ||
ServiceAccountInjection string = "ServiceAccountInjection" | ||
) |
7 changes: 7 additions & 0 deletions
7
bastionzero/service/targets/dbauthconfig/cloudserviceprovider.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package dbauthconfig | ||
|
||
// These constants represent the supported values for the CloudServiceProvider field in DatabaseAuthenticationConfig. | ||
const ( | ||
AWS string = "AWS" | ||
GCP string = "GCP" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package dbauthconfig | ||
|
||
// These constants represent the supported values for the Database field in DatabaseAuthenticationConfig. | ||
const ( | ||
CockroachDB string = "CockroachDB" | ||
MicrosoftSQLServer string = "MicrosoftSQLServer" | ||
MongoDB string = "MongoDB" | ||
MySQL string = "MySQL" | ||
Postgres string = "Postgres" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package dbauthconfig | ||
|
||
// DatabaseAuthenticationConfig defines a database authentication configuration supported | ||
// by BastionZero. When using a non-null DatabaseAuthenticationConfig in a request, it | ||
// is recommended that the supported configurations are retrieved from a GET request to | ||
// /api/v2/targets/database/supported-database-configs and then one of the returned | ||
// configurations is used in any subsequent create or update request as needed. | ||
type DatabaseAuthenticationConfig struct { | ||
AuthenticationType *string `json:"authenticationType,omitempty"` | ||
CloudServiceProvider *string `json:"cloudServiceProvider,omitempty"` | ||
Database *string `json:"database,omitempty"` | ||
Label *string `json:"label,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters