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

Validate API token before passing it on to Ansible #107

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

href
Copy link
Contributor

@href href commented Jan 10, 2025

When the token is set to a value that is not a valid HTTP header, Ansible's http client rejects it with an error that reveals the token.

This may cause it to be accidentally logged.

We now validate the token, to ensure it is a strict subset of valid HTTP header values. It includes a bit more characters than we currently use for our tokens, just in case we change our format.

See also #106, with credit to @Zellent.

When the token is set to a value that is not a valid HTTP header,
Ansible's http client  rejects it with an error that reveals the token.

This may cause it to be accidentally logged.

We now validate the token, to ensure it is a strict subset of valid
HTTP header values. It includes a bit more characters than we currently
use for our tokens, just in case we change our format.
@href href force-pushed the denis/token-validation branch from 72b635a to a663e71 Compare January 10, 2025 16:51
Copy link
Contributor

@ctx ctx left a comment

Choose a reason for hiding this comment

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

LGTM

@href href merged commit 6da9606 into master Jan 16, 2025
@href href deleted the denis/token-validation branch January 16, 2025 10:10
@href href mentioned this pull request Jan 16, 2025
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.

2 participants