Package co.decodable.sdk.pipeline
Interface DecodableSecret
public interface DecodableSecret
Represents a Decodable secret.
Exposes both metadata and the secret value. Can be used to e.g. inject a password to an external system like this:
SourceFunction<String> sourceFunction = SqlServerSource.<String>builder()
.hostname("localhost")
.port(1433)
.database("inventory")
.tableList("dbo.items")
.username("my-sql-server-user")
.password(DecodableSecret.withName("my-sql-server-password").value())
.deserializer(new JsonDebeziumDeserializationSchema())
.build();
-
Method Summary
Modifier and TypeMethodDescriptionReturns the creation time of the secret.Returns the secret description.name()
Returns the name of the secret.Returns the time the secret was last updated.value()
Returns the plaintext secret value.static DecodableSecret
Looks up the secret by name and returns aDecodableSecret
instance.
-
Method Details
-
value
String value()Returns the plaintext secret value. -
name
String name()Returns the name of the secret. -
description
String description()Returns the secret description. -
createTime
Instant createTime()Returns the creation time of the secret. -
updateTime
Instant updateTime()Returns the time the secret was last updated. -
withName
Looks up the secret by name and returns aDecodableSecret
instance.- Throws:
SecretNotFoundException
- if the secret is not present or cannot be read
-