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

#199 fix PDP service so docker changes can be tested #218

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I: This rename is the primary fix for PDP. Because the code that reads this file hasn't been updated to look for the new name yet, it was failing to find this config.

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>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I: Other than docs/javadocs, the classes/files in this module were identical to extensions-policy-decision-point-service. I believe these ended up as duplicates during the move from isolated repos to the monorepo. (Two separate repos had the same classes and got pulled into different places in the monorepo.)

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