Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow setting op.Crypto during provider setup #736

@MSP-GTI

Description

@MSP-GTI

Preflight Checklist

  • I could not find a solution in the existing issues, docs, nor discussions
  • I have joined the ZITADEL chat

Describe your problem

Currently, it is not possible to set a custom Crypto provider for an oidc provider.
Instead, the library builds its own crypto provider based on the given configuration key.

However, the current implementation uses a CFB mode implementation, which seems to have been deprecated by go itself.

It would be great if library users have the ability to set their own crypto provider. Especially since there already exists a handy interface for the crypto provider.

Describe your ideal solution

Ideally, the library would provide a WithCustomCrypto(crypto Crypto) Option function in order to customize the creation of the oidc provider.

I'm not sure how problematic a deprecated function is as the default implementation, but maybe it is worth considering a new solution for default behaviour too.

Version

3.35.0

Additional Context

It looks like the CFB mode has been deprecated since go version 1.24.0 onwards: https://pkg.go.dev/crypto/[email protected]#NewCFBEncrypter

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions