Rewrite JWTProxyConfigBuilder to use model objects to create config YAML#10633
Rewrite JWTProxyConfigBuilder to use model objects to create config YAML#10633mshaposhnik merged 12 commits intomasterfrom
Conversation
|
ci-test |
|
ci-test build report: |
|
ci-test |
|
ci-test build report: |
|
ci-test |
|
ci-test build report: |
| private List<VerifierProxyConfig> verifiedProxyConfigs; | ||
|
|
||
| @JsonProperty("signer_proxy") | ||
| private SignerProxy signerProxy; |
There was a problem hiding this comment.
It would be better to use the same style of naming for VerifierProxyConfig and SignerProxy. Both with or without suffix Config
| try { | ||
| return YAML_PARSER.writeValueAsString(config); | ||
| } catch (JsonProcessingException e) { | ||
| throw new RuntimeException("Error during creation of JWTProxy config YAML: ", e); |
There was a problem hiding this comment.
It would be better to use InfrastructureException or even InternalInfrastructureException instead of RuntimeException because I'm not sure that RuntimeException will be handled correctly.
Also, I guess "Error during creation of JWTProxy config YAML: " is incomplete and e.getMessage should be added there.
|
|
||
| @JsonInclude(Include.NON_NULL) | ||
| /** | ||
| * Desribes JWT verifier configuration |
| * | ||
| * @author Mykhailo Kuznietsov | ||
| */ | ||
| public class Config { |
There was a problem hiding this comment.
Config is a quite common object name. Maybe it would be better to add JwtProxy specific prefix
What does this PR do?
Add new objects for JWT Proxy config, and use ObjectMapper to generate YAML instead of formattign String template
What issues does this PR fix or reference?
#10402