Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.x/Adds OciSecretsMpMetaConfigProvider.java #7359

Closed
wants to merge 13 commits into from

Conversation

ljnelson
Copy link
Member

@ljnelson ljnelson commented Aug 10, 2023

This PR addresses #4238 by introducing OciSecretsMpMetaConfigProvider.java. Reviewers may find the going easiest by looking at that file first and following it "outwards".

In its current state this PR uses a provisional mechanism to acquire a Supplier<? extends BasicAuthenticationDetailsProvider>. I'll replace this mechanism with whatever the official recipe ends up being. For now, treat this mechanism as a black box.

In its current state, the OciSecretsMpMetaConfigProvider has, deliberately, very few features. Properties that its ConfigSource is supposed to respond to are indicated by a wholly-matching regular expression. No caching is performed. Nothing else fancy happens. Maybe it will later.

The approach of coupling this with Helidon's MicroProfile Config-flavored meta-configuration facility follows directions from others. Module, package, and artifact names follow directions from others. This Maven module's location within the Helidon tree also follows directions from others. I hope I got the directions right.

Subsequent revisions of this PR will include full documentation as it progresses.

…al API-using MicroProfile Config ConfigSource implementation, by way of a Helidon MpMetaConfigProvider

Signed-off-by: Laird Nelson <laird.nelson@oracle.com>
…eTest

Signed-off-by: Laird Nelson <laird.nelson@oracle.com>
Signed-off-by: Laird Nelson <laird.nelson@oracle.com>
@ljnelson ljnelson added MP 3.x Issues for 3.x version branch OCI microprofile labels Aug 10, 2023
@ljnelson ljnelson self-assigned this Aug 10, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 10, 2023
@ljnelson ljnelson added this to Sprint Scope in Backlog Aug 10, 2023
…/resources/mp-meta-config.yaml

Signed-off-by: Laird Nelson <laird.nelson@oracle.com>
Signed-off-by: Laird Nelson <laird.nelson@oracle.com>
Signed-off-by: Laird Nelson <laird.nelson@oracle.com>
Signed-off-by: Laird Nelson <laird.nelson@oracle.com>
Signed-off-by: Laird Nelson <laird.nelson@oracle.com>
…xes pipeline validation failure

Signed-off-by: Laird Nelson <laird.nelson@oracle.com>
…tation

Signed-off-by: Laird Nelson <laird.nelson@oracle.com>
Signed-off-by: Laird Nelson <laird.nelson@oracle.com>
Signed-off-by: Laird Nelson <laird.nelson@oracle.com>
…ing from a propertyNamesSupplier

Signed-off-by: Laird Nelson <laird.nelson@oracle.com>
@ljnelson ljnelson added the P2 label Aug 15, 2023
@trentjeff trentjeff self-requested a review August 15, 2023 19:38

/**
* The sole {@linkplain #supportedTypes() supported type} of this {@link OciSecretsMpMetaConfigProvider} ({@value
* #OCI_SECRETS}).
Copy link
Member Author

Choose a reason for hiding this comment

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

Whoops

etc/javadoc/oci/package-list Show resolved Hide resolved
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.14</version>
Copy link
Member

Choose a reason for hiding this comment

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

versions should be defined above, or better yet under dependencies/pom.xml. Deferring to @barchetta

<!-- Compile-scoped dependencies. -->

<dependency>
<groupId>io.helidon.common</groupId>
Copy link
Member

Choose a reason for hiding this comment

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

i don't see runtime - so i guess that is coming later...

* Infrastructure Vault</a>.
*/
@SuppressWarnings("try")
class AbstractSecretBundleConfigSource implements AutoCloseable, ConfigSource {
Copy link
Member

Choose a reason for hiding this comment

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

There is no doubt in my mind that we will need to implement Polling and/or Event in order to support reloading of certificates with associated new secrets that go along with them. I'll file a tracking issue for that follow-up work. See #7323

@SuppressWarnings("checkstyle:linelength")
static Optional<Supplier<SimpleAuthenticationDetailsProvider>> simple(Function<? super String, ? extends Optional<String>> c,
Supplier<? extends SimpleAuthenticationDetailsProviderBuilder> bs,
Function<? super SimpleAuthenticationDetailsProviderBuilder, ? extends Supplier<SimpleAuthenticationDetailsProvider>> f) {
Copy link
Member

Choose a reason for hiding this comment

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

This will use OciExtension from the runtime module?

I guess its too early to review this PR. Stopping here and will review when it comes out of draft.

@ljnelson
Copy link
Member Author

Pausing in favor of #7391, per instructions

@ljnelson ljnelson removed the request for review from barchetta August 17, 2023 00:49
@ljnelson ljnelson moved this from Sprint Scope to High priority in Backlog Aug 17, 2023
@trentjeff trentjeff changed the title Adds OciSecretsMpMetaConfigProvider.java 3.x/Adds OciSecretsMpMetaConfigProvider.java Aug 17, 2023
@ljnelson
Copy link
Member Author

ljnelson commented Sep 8, 2023

Closing in favor of #7555.

@ljnelson ljnelson closed this Sep 8, 2023
Backlog automation moved this from High priority to Closed Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Issues for 3.x version branch microprofile MP OCA Verified All contributors have signed the Oracle Contributor Agreement. OCI P2
Projects
Backlog
  
Closed
Development

Successfully merging this pull request may close these issues.

None yet

2 participants