Skip to content

client: Accept MIME parameters in content types#517

Merged
bilelmoussaoui merged 1 commit into
linux-credentials:mainfrom
caniko:agent/accept-content-type-parameters
Jul 13, 2026
Merged

client: Accept MIME parameters in content types#517
bilelmoussaoui merged 1 commit into
linux-credentials:mainfrom
caniko:agent/accept-content-type-parameters

Conversation

@caniko

@caniko caniko commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

ContentType currently accepts only the two bare media types. That rejects valid Secret Service values with MIME parameters: the specification itself uses text/plain; charset=utf8, and go-keyring sends that exact value.

This keeps the existing Text/Blob model, but compares only the base media type. Matching is trimmed and case-insensitive, outgoing serialization stays unchanged, and unknown base types still report the original full value.

I hit this through kubelogin: writing its token cache failed before kubectl could return cluster credentials.

Tested with:

  • the full client test suite with native crypto
  • the full client test suite with OpenSSL crypto
  • a go-keyring Set/Get/Delete round trip against oo7

@caniko

caniko commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Tested on my own NixOS flake deployed with Cosmic DE

@caniko
caniko marked this pull request as ready for review July 13, 2026 15:26
@bilelmoussaoui
bilelmoussaoui merged commit e30741e into linux-credentials:main Jul 13, 2026
16 of 17 checks passed
@bilelmoussaoui

Copy link
Copy Markdown
Collaborator

thank you!

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