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

[Feature]: Add a field for a secret to the Sink Type #309

Closed
2 tasks done
phillipahereza opened this issue Jan 8, 2024 · 0 comments · Fixed by #317
Closed
2 tasks done

[Feature]: Add a field for a secret to the Sink Type #309

phillipahereza opened this issue Jan 8, 2024 · 0 comments · Fixed by #317
Assignees

Comments

@phillipahereza
Copy link
Contributor

phillipahereza commented Jan 8, 2024

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've discussed this feature request in the K8sGPT Slack and got positive feedback

Is this feature request related to a problem?

Yes

Problem Description

I am frustrated trying to add a sink whose endpoint contains an API Key that should remain a secret. I believe there is a security risk associated with saving endpoints that might contain secrets as plaintext strings in the CR, such as the Slack webhook URL, for example.

Solution Description

I think the best solution would be to add a field in the Sink type for a secret. The creator of the sink can then determine how to use this secret to build their request in the configure method.

Let's consider a hypothetical Telegram bot as a sink. Requests to the Telegram API are presented in the form https://api.telegram.org/bot<token>/METHOD_NAME. The https://api.telegram.org/bot could be stored in the endpoint field, and the token stored as the secret. The full URL could then be assembled in the configure method.

Benefits

Allows users to create sinks with secrets. Additionally, it allows users to create sinks where authentication is separate from the endpoint. For example, authentication that can be passed via headers instead of being inherently tied to the endpoint.

Potential Drawbacks

No response

Additional Information

I would be happy to work on this

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