zitadel/internal/crypto
Tim Möhlmann 64a3bb3149
feat(v3alpha): web key resource (#8262)
# Which Problems Are Solved

Implement a new API service that allows management of OIDC signing web
keys.
This allows users to manage rotation of the instance level keys. which
are currently managed based on expiry.

The API accepts the generation of the following key types and
parameters:

- RSA keys with 2048, 3072 or 4096 bit in size and:
  - Signing with SHA-256 (RS256)
  - Signing with SHA-384 (RS384)
  - Signing with SHA-512 (RS512)
- ECDSA keys with
  - P256 curve
  - P384 curve
  - P512 curve
- ED25519 keys

# How the Problems Are Solved

Keys are serialized for storage using the JSON web key format from the
`jose` library. This is the format that will be used by OIDC for
signing, verification and publication.

Each instance can have a number of key pairs. All existing public keys
are meant to be used for token verification and publication the keys
endpoint. Keys can be activated and the active private key is meant to
sign new tokens. There is always exactly 1 active signing key:

1. When the first key for an instance is generated, it is automatically
activated.
2. Activation of the next key automatically deactivates the previously
active key.
3. Keys cannot be manually deactivated from the API
4. Active keys cannot be deleted

# Additional Changes

- Query methods that later will be used by the OIDC package are already
implemented. Preparation for #8031
- Fix indentation in french translation for instance event
- Move user_schema translations to consistent positions in all
translation files

# Additional Context

- Closes #8030
- Part of #7809

---------

Co-authored-by: Elio Bischof <elio@zitadel.com>
2024-08-14 14:18:14 +00:00
..
database refactor(database): exchange connection pool (#8325) 2024-07-17 15:16:02 +00:00
file
testdata/fuzz/FuzzAESCrypto_DecryptString fix(crypto): reject decrypted strings with non-UTF8 characters. (#8374) 2024-08-02 08:38:37 +00:00
aes_test.go fix(crypto): reject decrypted strings with non-UTF8 characters. (#8374) 2024-08-02 08:38:37 +00:00
aes.go fix(crypto): reject decrypted strings with non-UTF8 characters. (#8374) 2024-08-02 08:38:37 +00:00
code_mock.go feat(crypto): use passwap for machine and app secrets (#7657) 2024-04-05 09:35:49 +00:00
code_mocker.go feat(crypto): use passwap for machine and app secrets (#7657) 2024-04-05 09:35:49 +00:00
code_test.go feat(crypto): use passwap for machine and app secrets (#7657) 2024-04-05 09:35:49 +00:00
code.go feat(crypto): use passwap for machine and app secrets (#7657) 2024-04-05 09:35:49 +00:00
crypto_mock.go feat(crypto): use passwap for machine and app secrets (#7657) 2024-04-05 09:35:49 +00:00
crypto_test.go feat(crypto): use passwap for machine and app secrets (#7657) 2024-04-05 09:35:49 +00:00
crypto.go feat(v3alpha): web key resource (#8262) 2024-08-14 14:18:14 +00:00
ellipticcurve_enumer.go feat(v3alpha): web key resource (#8262) 2024-08-14 14:18:14 +00:00
generate.go
key_storage.go
key.go
passwap_test.go feat(crypto): use passwap for machine and app secrets (#7657) 2024-04-05 09:35:49 +00:00
passwap.go feat(crypto): support md5 plain for imported password hashes (#8189) 2024-06-25 11:10:49 +03:00
rsa.go feat(cmd): mirror (#7004) 2024-05-30 09:35:30 +00:00
rsabits_enumer.go feat(v3alpha): web key resource (#8262) 2024-08-14 14:18:14 +00:00
rsahasher_enumer.go feat(v3alpha): web key resource (#8262) 2024-08-14 14:18:14 +00:00
web_key_test.go feat(v3alpha): web key resource (#8262) 2024-08-14 14:18:14 +00:00
web_key.go feat(v3alpha): web key resource (#8262) 2024-08-14 14:18:14 +00:00
webkeyconfigtype_enumer.go feat(v3alpha): web key resource (#8262) 2024-08-14 14:18:14 +00:00