adorsys / adorsys/keycloak-config-cli
KeyProvider Import
- Linguagem predominante
- Java
- Estrelas
- 1.2k
- Forks
- 200
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
### Current Behavior
Hi,
I am trying to import a KeyProvider.
In the screenshot you can see what the import file looks like. The content of the private key is a variable substitution. The original declaration is:
`"$(file:UTF-8:$(env:SIGNING_PRIVATE_KEY_A_PATH))"`
The newlines of the PEM file are not correctly parsed by the yaml parser. As you can see after the
`-----BEGIN PRIVATE KEY-----` there is a space but it has to be a newline character. This leads to an error in keycloak:
`Failed to decode private key`
### Expected Behavior
The contents of the file are correctly parsed and imported in keycloak.
### Steps To Reproduce
```markdown
Create a valid import file for component and KeyProvider
Insert a valid private key.
Try to import
Example file:
https://gist.github.com/inituser123/f8cfc723e017413dfe83ca28e1f456b9
```
### Deployment Method
Docker
### Environment
- Keycloak Version: [26.6.2]
- keycloak-config-cli Version: [6.5.0-26.5.4]
- Java Version: [21]
### Relevant configuration (sanitized)
```yaml
```
### Logs / error output
```shell
```
### Anything else?
The error is most probably in the `KeycloakImportProvider` method `readContent`. There the `String content` is loaded as `yaml`.
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.