Skip to content

Commit

Permalink
chore: added more log to understand how the metada is behaving in the…
Browse files Browse the repository at this point in the history
… new docker image
  • Loading branch information
lfdesousa committed Jul 16, 2024
1 parent 9a45609 commit 6c44a13
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ch.bfh</groupId>
<artifactId>mobile-access-gateway</artifactId>
<version>0.0.52</version>
<version>0.0.53</version>
<description>FHIR Gateway supporting the PMIR and MHD server actors and uses XDS/PIXV3 to communicate with an XDS Affinity Domain</description>
<packaging>jar</packaging>

Expand Down
1 change: 1 addition & 0 deletions src/main/java/ch/bfh/ti/i4mi/mag/MobileAccessGateway.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@ public void init() {

// You can also add the environment variable check here
System.out.println("matadata-idp-location env var: " + System.getenv("matadata-idp-location"));
System.getenv().forEach((key, value) -> log.info("{}={}", key, value));
}
}
8 changes: 7 additions & 1 deletion src/main/java/ch/bfh/ti/i4mi/mag/xua/SamlIDPIntegration.java
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,20 @@ public SAMLDiscovery samlIDPDiscovery() {

public ExtendedMetadataDelegate ssoCircleExtendedMetadataProvider(String entityId)
throws MetadataProviderException {
log.info("Initializing ssoCircleExtendedMetadataProvider for entityId: {}", entityId);
IDPConfig conf = getIDPs().get(entityId);
if (conf == null) return null;

// Use the environment variable if it's set, otherwise fall back to the config
String idpSSOCircleMetadataURL = metadataIdpLocation != null && !metadataIdpLocation.isEmpty()
? metadataIdpLocation
: conf.getMetadataUrl();

log.info("metadataIdpLocation: {}", metadataIdpLocation);
log.info("conf.getMetadataUrl(): {}", conf.getMetadataUrl());
log.info("Final idpSSOCircleMetadataURL: {}", idpSSOCircleMetadataURL);
File metadataFile = new File(idpSSOCircleMetadataURL);
log.info("Metadata file exists: {}", metadataFile.exists());
log.info("Metadata file absolute path: {}", metadataFile.getAbsolutePath());
AbstractReloadingMetadataProvider prov;
if (idpSSOCircleMetadataURL.startsWith("http:") || idpSSOCircleMetadataURL.startsWith("https:")) {
prov = new HTTPMetadataProvider(
Expand Down

0 comments on commit 6c44a13

Please sign in to comment.