Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't require DEV_DSF_FHIR_SERVER_ORGANIZATION_THUMBPRINT #177

Open
schwzr opened this issue Feb 8, 2024 · 1 comment
Open

Don't require DEV_DSF_FHIR_SERVER_ORGANIZATION_THUMBPRINT #177

schwzr opened this issue Feb 8, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@schwzr
Copy link
Member

schwzr commented Feb 8, 2024

In theory, the value DEV_DSF_FHIR_SERVER_ORGANIZATION_THUMBPRINT should not be required as we are already required to set the client certificate on the fhir server.

Theoretically, it would therefore be possible to omit the value in most cases, so that this easily missed step is no longer necessary when updating a client certificate.

For "more special constructs", e.g. if a different client certificate is used on the FHIR server than on the BPE server, the bundle.xml file would probably have to be adapted manually anyway.

@schwzr schwzr added the enhancement New feature or request label Feb 8, 2024
@hhund hhund added this to the 2.0.0 milestone Jun 5, 2024
@hhund
Copy link
Member

hhund commented Jun 5, 2024

Could be implemented similar to the injectEndpointProperties function of the PropertiesConfig class:

private static void injectEndpointProperties(ConfigurableEnvironment environment)
{
try
{
URL baseUrl = new URL(environment.getRequiredProperty("dev.dsf.fhir.server.base.url"));
if (baseUrl.getHost() == null || baseUrl.getHost().isBlank())
throw new IllegalStateException("No hostname defined in FHIR server base url");
Properties properties = new Properties();
properties.put("dev.dsf.fhir.server.endpoint.address", baseUrl.toString());
properties.put("dev.dsf.fhir.server.endpoint.identifier.value", baseUrl.getHost());
environment.getPropertySources().addFirst(new PropertiesPropertySource("enpoint-properties", properties));
}
catch (MalformedURLException | IllegalStateException e)
{
throw new RuntimeException(e);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants