Skip to content

Commit

Permalink
#199 fix PDP service so docker changes can be tested
Browse files Browse the repository at this point in the history
 - Deletes duplicative, unused `foundation-policy-decision-point` module
 - Repackages `extensions-pdp-service` to be more in-line with rest of
   the project
 - Undo aiops -> aissemble property file rename as the code hasn't been
   updated
 - Update JKS key alias to from aiops to aissemble
 - Add healthcheck URL to PDP service for easy testing
  • Loading branch information
ewilkins-csi committed Jul 18, 2024
1 parent e54f099 commit 814df64
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 243 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"category": "subject",
"type": "boolean",
"required": "false",
"attributePointClass": "com.boozallen.LocalAttributePoint"
"attributePointClass": "com.boozallen.aissemble.security.LocalAttributePoint"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN mkdir -p /deployments/krausening/
COPY target/dockerbuild/*.jar /deployments/

COPY ./src/main/resources/truststore/aissemble-secure.jks /deployments/
COPY ./src/main/resources/krausening/base/aissemble-security.properties /deployments/krausening/
COPY ./src/main/resources/krausening/base/aiops-security.properties /deployments/krausening/
COPY ./src/main/resources/authorization/policies/test-policy.xml /deployments/
COPY ./src/main/resources/authorization/attributes/test-attributes.json /deployments/
COPY ./src/main/resources/authorization/pdp.xml /deployments/
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ protected AiopsAttributePoint findAttributePointImplementation(AiopsAttribute at
}
}
} catch (ClassNotFoundException e) {
logger.error("Could not find attribute point '{}' in classpath!", attributePointClassName);
logger.error("Could not find attribute point '{}' in classpath!", attributePointClassName, e);
} catch (InstantiationException | IllegalAccessException e) {
logger.error("Could not instantiate attribute point '" + attributePointClassName + "'!", e);
logger.error("Could not instantiate attribute point '{}'!", attributePointClassName, e);
}

return attributePoint;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.boozallen;
package com.boozallen.aissemble.security;

/*-
* #%L
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.boozallen.aiops.security.authorization.policy.PolicyDecisionPoint;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
Expand Down Expand Up @@ -65,4 +66,11 @@ public String authenticate(AuthRequest authRequest) {

return jwt;
}

@GET
@Path("/healthcheck")
@Produces(MediaType.TEXT_PLAIN)
public String healthCheck() {
return "PDP Service is running...\n";
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion foundation/foundation-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<description>Contains the modules used for security</description>

<modules>
<module>foundation-policy-decision-point</module>
<module>aissemble-foundation-pdp-client-python</module>
<module>foundation-pdp-client-java</module>
</modules>
Expand Down

0 comments on commit 814df64

Please sign in to comment.