Skip to content

Commit

Permalink
Added AMS integration to the IAS variant (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhunglam authored Oct 21, 2024
1 parent 41cdd3d commit 9de2705
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mta-multi-tenant-ias-ams.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ modules:
parameters:
memory: 1024M
disk-quota: 512M
buildpack: sap_java_buildpack_jakarta
buildpacks:
- https://github.com/SAP/cloud-authorization-buildpack/releases/latest/download/opa_buildpack.zip
- sap_java_buildpack_jakarta
routes:
- route: '${default-url}'
- route: '${default-host}.cert.${default-domain}'
Expand All @@ -22,6 +24,7 @@ modules:
CDS_MULTITENANCY_APPUI_TENANTSEPARATOR: "-"
JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jre.SAPMachineJRE']"
JBP_CONFIG_SAP_MACHINE_JRE: '{ version: 21.+ }'
AMS_DCL_ROOT: "/BOOT-INF/classes/ams/"
build-parameters:
builder: custom
commands:
Expand Down
14 changes: 14 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<xsuaa.version>3.5.3</xsuaa.version>
<cf-java-logging-support.version>3.8.4</cf-java-logging-support.version>
<cds.cdsdk-version>8.3.0</cds.cdsdk-version>
<ams.client.version>1.7.0</ams.client.version>
</properties>

<modules>
Expand Down Expand Up @@ -71,6 +72,19 @@
<version>4.0.0</version>
</dependency>

<!-- AUTHORIZATION MANAGEMENT SERVICE (AMS) -->
<dependency>
<groupId>com.sap.cloud.security.ams.client</groupId>
<artifactId>jakarta-ams</artifactId>
<version>1.7.0</version>
</dependency>
<!-- INTEGRATE CAP WITH AMS -->
<dependency>
<groupId>com.sap.cloud.security.ams.client</groupId>
<artifactId>cap-support</artifactId>
<version>1.7.0</version>
</dependency>

</dependencies>
</dependencyManagement>

Expand Down
11 changes: 11 additions & 0 deletions srv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,17 @@
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>

<!-- ADD THE AUTHORIZATION MANAGEMENT SERVICE (AMS) -->
<dependency>
<groupId>com.sap.cloud.security.ams.client</groupId>
<artifactId>jakarta-ams</artifactId>
</dependency>
<!-- INTEGRATE CAP WITH AMS -->
<dependency>
<groupId>com.sap.cloud.security.ams.client</groupId>
<artifactId>cap-support</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
7 changes: 7 additions & 0 deletions srv/src/main/resources/ams/bookshop/bookshop.dcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
POLICY Admin {
GRANT admin ON $SCOPES;
}

POLICY Expert {
GRANT expert ON $SCOPES;
}
2 changes: 2 additions & 0 deletions srv/src/main/resources/ams/schema.dcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SCHEMA {
}

0 comments on commit 9de2705

Please sign in to comment.