Skip to content

[FLINK-38263][table] add secret store related interfaces#27394

Open
lihaosky wants to merge 9 commits intoapache:masterfrom
confluentinc:connection-api
Open

[FLINK-38263][table] add secret store related interfaces#27394
lihaosky wants to merge 9 commits intoapache:masterfrom
confluentinc:connection-api

Conversation

@lihaosky
Copy link
Contributor

@lihaosky lihaosky commented Jan 8, 2026

What is the purpose of the change

Add secret store related api in FLIP-529

Brief change log

  • SecretStore, SecretStoreFactory interfaces
  • Add secret-store kind config option
  • Use them in TableEnvironmentImpl and EnvironmentSettings

Verifying this change

Unit test

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (yes)
  • If yes, how is the feature documented? (JavaDocs)

@flinkbot
Copy link
Collaborator

flinkbot commented Jan 8, 2026

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@github-actions github-actions bot added the community-reviewed PR has been reviewed by the community. label Jan 9, 2026
Copy link
Contributor

@twalthr twalthr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lihaosky.

// TODO (FLINK-38261): pass secret store to catalog manager for encryption/decryption
final SecretStore secretStore =
settings.getSecretStore() != null
? settings.getSecretStore()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not discover a factory if a secret store is already provided. Please also update the CatalogStoreFactory above which has the same issue. Also the TableFactoryUtil class is kind of deprecated. Move the methods for both secret and catalog store to a new org.apache.flink.table.api.internal.ApiFactoryUtil

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created a new PR for the refactoring: #27531


@Internal
@Nullable
public SecretStore getSecretStore() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Optional, maybe also for CatalogStore for consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put in new PR: #27531

@Internal
public class GenericInMemorySecretStore implements ReadableSecretStore, WritableSecretStore {

private static final ObjectMapper objectMapper = new ObjectMapper();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for Jackson deps here. We can store Java objects and avoid ser/de.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Store an immutable Map<String, String>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants