adorsys / adorsys/status-list-server

fscert variant crashes on chart-generated self-signed key (PKCS#1 vs PKCS#8 mismatch)

Aberta Para iniciantes
#531 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Rust
Estrelas
22
Forks
5
Merge médio
2d 6h
PRs com merge (30d)
47

Descrição

## Objective

The `fscert` image variant crashes at startup when using the chart's `fallbackSecret.generatedCertificate` self-signed certificate, because Helm's `genSelfSignedCert` produces a PKCS#1 RSA private key (`BEGIN RSA PRIVATE KEY`) while the app's signing-key parser only accepts PKCS#8 (`BEGIN PRIVATE KEY`). Make the app's signing-key parser accept both PKCS#1 and PKCS#8 formats so the self-signed certificate path works.

## Deliverables

- Update `src/utils/cert_manager/strategy.rs` `normalize_pkcs8_key` (and any related key-loading path) to detect and convert PKCS#1 RSA PEM keys (`BEGIN RSA PRIVATE KEY`) to PKCS#8, in addition to the existing PKCS#8 support.
- Unit tests covering PKCS#1 RSA PEM, PKCS#8 PEM, and PKCS#8 DER signing keys.
- Update the chart's `fallbackSecret.generatedCertificate` documentation/behavior if needed to note the supported key formats.

## Acceptance Criteria

- [ ] The `fscert` variant starts successfully when using the chart's `fallbackSecret.generatedCertificate` self-signed certificate (no `Failed to parse key` crash).
- [ ] `normalize_pkcs8_key` accepts a PKCS#1 RSA PEM key (`BEGIN RSA PRIVATE KEY`) and returns a valid PKCS#8 PEM.
- [ ] `normalize_pkcs8_key` continues to accept PKCS#8 PEM and PKCS#8 DER keys.
- [ ] New unit tests pass (`cargo test --lib utils::cert_manager::strategy`).
- [ ] A local deployment using the `fscert` variant + `values-local.yaml` reaches `1/1 Running` and `/health/ready` returns `READY`.

## Dependencies

_None_

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Open `src/utils/cert_manager/strategy.rs`, especially `normalize_pkcs8_key`, and trace the signing-key loading path used by `fscert` startup. Add or update unit tests in the `utils::cert_manager::strategy` scope for PKCS#1 RSA PEM, PKCS#8 PEM, and PKCS#8 DER keys, then run `cargo test --lib utils::cert_manager::strategy`. Then validate with the `fscert` variant using `values-local.yaml` and `fallbackSecret.generatedCertificate` until it reaches `1/1 Running` and `/health/ready` returns `READY`; adjust chart docs for that option if key-format expectations need clarification.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
helm, rust
Domínio
backend
Tipo de issue
Bug
Dificuldade
2/5
Tempo estimado
1-3 horas
Status de atividade
Ativa
Clareza
Claramente especificada
Facilidade para iniciantes
74/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.