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

Support new CSP auth method for Wavefront (AOA) #4054

Closed
oppegard opened this issue Aug 31, 2023 · 2 comments · Fixed by #4102
Closed

Support new CSP auth method for Wavefront (AOA) #4054

oppegard opened this issue Aug 31, 2023 · 2 comments · Fixed by #4102
Labels
enhancement A general enhancement registry: wavefront A Wavefront (Tanzu Observability) Registry related issue spring-boot change Change is needed in Spring Boot for this issue
Milestone

Comments

@oppegard
Copy link

Please describe the feature request.

Wavefront has integrated into VMware's CSP authentication system, and the wavefront-sdk-java library has been updated to support that. We would like micrometer to support this additional authentication method in WavefrontMeterRegistry

Rationale

New Wavefront customers will be onboarded to CSP-only clusters, and the existing authentication method of WF API Token will not be available to them. To allow these customers to use micrometer for sending metrics to Wavefront, they'll need CSP authentication available.

Additional context

The release version of wavefront-sdk-java with these changes is 3.4.0.

There are two types of CSP authentication: server-to-server tokens and user-api-tokens. We envision the changes looking something like this:

  • CSP User API Token

    • In WavefrontMeterRegistry, something like new WavefrontClient.Builder(getWavefrontReportingUri(config), config.cspApiToken()).useTokenForCSP()
  • CSP Server to Server OAuth

    • In WavefrontMeterRegistry, something like new WavefrontClient.Builder(getWavefrontReportingUri(config), config.cspClientId(), config.cspClientSecret())
    • If an optional OrgID is provided, calling builder.cspOrgId(config.cspOrgId())

Note that CSP Authentication is only valid for Direct Ingestion scenarios (like DEFAULT_DIRECT in WavefrontConfig). It is not relevant for the DEFAULT_PROXY case.

Last, we've created a similar issue for Spring Boot: spring-projects/spring-boot#37165

Thank you!

@oppegard and @warshawd

@shakuzen shakuzen added enhancement A general enhancement registry: wavefront A Wavefront (Tanzu Observability) Registry related issue and removed waiting-for-triage labels Aug 31, 2023
@shakuzen shakuzen added this to the 1.12 backlog milestone Sep 1, 2023
@shakuzen
Copy link
Member

shakuzen commented Sep 1, 2023

Until dedicated support for this is added, users can provide a customized WavefrontSender to the WavefrontMeterRegistery.builder(). For example:

WavefrontMeterRegistry meterRegistry = WavefrontMeterRegistry.builder(config)
    .wavefrontSender(WavefrontMeterRegistry.getDefaultSenderBuilder(config).useTokenForCSP().build())
    .build();
WavefrontMeterRegistry meterRegistry = WavefrontMeterRegistry.builder(config)
    .wavefrontSender(new WavefrontClient.Builder(getWavefrontReportingUri(config), cspClientId, cspClientSecret)
        .cspOrgId(cspOrgId)
        .build())
    .build();

@shakuzen
Copy link
Member

shakuzen commented Oct 5, 2023

Resolved by #4102. A new configuration method apiTokenType has been added to WavefrontConfig. This, in conjunction with the existing apiToken method, can be used to configure the new CSP auth method. See wavefrontHQ/wavefront-sdk-java#301 for more about the format to specify the token, especially when there are multiple parts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A general enhancement registry: wavefront A Wavefront (Tanzu Observability) Registry related issue spring-boot change Change is needed in Spring Boot for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants