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

AccessPolicyToken: Add basic auth credentials to ConnectionSecret for use with DataSource #241

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

holgerjh
Copy link
Contributor

Description of your changes

This PR changes the connection secret created by accesspolicytokens.cloud.grafana.crossplane.io so that it contains an additional key that can be used by datasources (datasources.oss.grafana.crossplane.io) that make use of basic authentication.

In detail, a new key basicAuthCredentials is added to the connection secret. It contains a stringified JSON-object with the following content:

{"basicAuthPassword": "<TOKEN>"}

We also provided an example to see how it can be used.

Fixes #238

I have:

  • Read and followed Crossplane's [contribution process].
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

  • Run the provider locally and applied the example (with replaced "changeme" fields).
  • Checked that the datasource was properly created in grafana cloud (basic auth password configured and connection working)

@holgerjh holgerjh requested a review from a team as a code owner January 31, 2025 12:59
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@3543c0b). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff           @@
##             main    #241   +/-   ##
======================================
  Coverage        ?   0.00%           
======================================
  Files           ?     245           
  Lines           ?   41035           
  Branches        ?       0           
======================================
  Hits            ?       0           
  Misses          ?   41035           
  Partials        ?       0           
Flag Coverage Δ
unittests 0.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataSources canot be created with Tokens from AccessPolicyToken
2 participants