Skip to content

Commit

Permalink
Rename interface to vault-kv
Browse files Browse the repository at this point in the history
vault-kv reflects the interface purpose better than `secrets`
  • Loading branch information
gboutry committed Aug 18, 2023
1 parent 3399ded commit 26810e7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"$ref": "#/definitions/BaseModel"
},
"app": {
"$ref": "#/definitions/SecretsProviderSchema"
"$ref": "#/definitions/VaultKvProviderSchema"
}
},
"required": [
Expand Down Expand Up @@ -47,8 +47,8 @@
"$ref": "#/definitions/UnitCredentialsSchema"
}
},
"SecretsProviderSchema": {
"title": "SecretsProviderSchema",
"VaultKvProviderSchema": {
"title": "VaultKvProviderSchema",
"type": "object",
"properties": {
"vault_url": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
"type": "object",
"properties": {
"unit": {
"$ref": "#/definitions/UnitSecretsRequirerSchema"
"$ref": "#/definitions/UnitVaultKvRequirerSchema"
},
"app": {
"$ref": "#/definitions/AppSecretsProviderSchema"
"$ref": "#/definitions/AppVaultKvProviderSchema"
}
},
"required": [
"unit",
"app"
],
"definitions": {
"UnitSecretsRequirerSchema": {
"title": "UnitSecretsRequirerSchema",
"UnitVaultKvRequirerSchema": {
"title": "UnitVaultKvRequirerSchema",
"type": "object",
"properties": {
"egress_subnet": {
Expand All @@ -26,8 +26,8 @@
}
}
},
"AppSecretsProviderSchema": {
"title": "AppSecretsProviderSchema",
"AppVaultKvProviderSchema": {
"title": "AppVaultKvProviderSchema",
"type": "object",
"properties": {
"secret_backend": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `secrets`
# `vault-kv`

## Usage

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ class CredentialsSchema(BaseModel):
__root__: Mapping[str, UnitCredentialsSchema] = Field("Units' credentials")


class SecretsProviderSchema(BaseModel):
class VaultKvProviderSchema(BaseModel):
vault_url: str = Field(description="The URL of the Vault server to connect to.")
kv_mountpoint: str = Field(description="The mountpoint of the KV store to use.")
credentials: Json[CredentialsSchema] = Field(
description="The credentials to use to authenticate to Vault."
)


class AppSecretsProviderSchema(BaseModel):
class AppVaultKvProviderSchema(BaseModel):
secret_backend: str = Field("The name of the secret backend to use.")


class UnitSecretsRequirerSchema(BaseModel):
class UnitVaultKvRequirerSchema(BaseModel):
egress_subnet: str = Field("Egress subnet to use.")


class ProviderSchema(DataBagSchema):
"""The schema for the provider side of this interface."""

app: SecretsProviderSchema
app: VaultKvProviderSchema


class RequirerSchema(DataBagSchema):
"""The schema for the requirer side of this interface."""

app: AppSecretsProviderSchema
unit: UnitSecretsRequirerSchema
app: AppVaultKvProviderSchema
unit: UnitVaultKvRequirerSchema

0 comments on commit 26810e7

Please sign in to comment.