Skip to content

Commit

Permalink
[WFLY-18503] security-domain-to-domain minor fixes/enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
emmartins committed Mar 26, 2024
1 parent bae93df commit 228e6a3
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
uses: ./.github/workflows/quickstart_ci.yml
with:
QUICKSTART_PATH: security-domain-to-domain
DEPLOYMENT_DIR: web
DEPLOYMENT_DIR: ear
TEST_PROVISIONED_SERVER: true
TEST_OPENSHIFT: false
MVN_COMMAND: install
28 changes: 9 additions & 19 deletions security-domain-to-domain/README-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ include::../shared-doc/attributes.adoc[]
The `security-domain-to-domain` quickstart demonstrates the propagation of an identity across two different deployments using different security domains.

:standalone-server-type: default
:archiveType: war
:archiveType: ear
:uses-h2:
:restoreScriptName: restore-configuration.cli

:deploymentDir: ear

== What is it?

Expand Down Expand Up @@ -242,6 +242,8 @@ Caller Has Role 'Manager'=true

This shows that the user `quickstartUser` calls the servlet and has role `User` but does not have the role `Manager`, as the call reaches the EJB the principal is still `quickstartUser` but now the identity does not have the role `User` and instead has the role `Manager`.

// Server Distribution Testing
include::../shared-doc/run-integration-tests-with-server-distribution.adoc[leveloffset=+2]
// Undeploy the Quickstart
include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+1]

Expand All @@ -250,23 +252,11 @@ include::../shared-doc/restore-standalone-server-configuration.adoc[leveloffset=

// Restore the {productName} Standalone Server Configuration Manually
include::../shared-doc/restore-standalone-server-configuration-manual.adoc[leveloffset=+2]
// Run the Quickstart in Red Hat CodeReady Studio or Eclipse
include::../shared-doc/run-the-quickstart-in-jboss-developer-studio.adoc[leveloffset=+1]

// Additional JBDS instructions

* Be sure to configure the server by running the JBoss CLI commands as described above under xref:configure_the_server[Configure the {productName} Server]. Stop the server at the end of that step.
* Be sure to xref:restore_the_standalone_server_configuration[Restore the Server Configuration] when you have completed testing this quickstart.

// Debug the Application
include::../shared-doc/debug-the-application.adoc[leveloffset=+1]

//*************************************************
// Product Release content only
//*************************************************
ifdef::ProductRelease[]
// Build and run sections for other environments/builds
ifndef::ProductRelease,EAPXPRelease[]
include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1]
endif::[]

// Quickstart not compatible with OpenShift
include::../shared-doc/openshift-incompatibility.adoc[leveloffset=+1]
endif::[]
include::../shared-doc/openshift-incompatibility.adoc[leveloffset=+1]
59 changes: 59 additions & 0 deletions security-domain-to-domain/ear/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,63 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>provisioned-server</id>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<configuration>
<feature-packs>
<feature-pack>
<location>org.wildfly:wildfly-galleon-pack:${version.server}</location>
</feature-pack>
</feature-packs>
<layers>
<!-- layers may be used to customize the server to provision -->
<layer>cloud-server</layer>
<layer>ejb</layer>
<layer>h2-driver</layer>
</layers>
<packaging-scripts>
<packaging-script>
<scripts>
<script>${basedir}/../configure-server.cli</script>
</scripts>
<!-- Expressions resolved during server execution -->
<resolve-expressions>false</resolve-expressions>
</packaging-script>
</packaging-scripts>
<!-- deploys the quickstart on root web context -->
<name>ROOT.ear</name>
</configuration>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<modules>
<webModule>
<groupId>${project.groupId}</groupId>
<artifactId>security-domain-to-domain-web</artifactId>
<contextRoot>/</contextRoot>
</webModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
76 changes: 5 additions & 71 deletions security-domain-to-domain/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,16 @@
<module>ejb</module>
<module>web</module>
<module>ear</module>
<module>test</module>
</modules>

<properties>
<!-- the version for the Server -->
<version.server>31.0.0.Beta1</version.server>
<!-- The versions for BOMs, Dependencies and Plugins -->
<version.server>31.0.0.Final</version.server>
<!-- the versions for BOMs, Packs and Plugins -->
<version.bom.ee>${version.server}</version.bom.ee>
<version.pack.cloud>5.0.0.Final</version.pack.cloud>
<version.plugin.wildfly>4.2.1.Final</version.plugin.wildfly>
<version.pack.cloud>6.0.0.Final</version.pack.cloud>
<version.plugin.wildfly>5.0.0.Beta3</version.plugin.wildfly>
</properties>

<repositories>
Expand Down Expand Up @@ -160,71 +161,4 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>provisioned-server</id>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<configuration>
<feature-packs>
<feature-pack>
<location>org.wildfly:wildfly-galleon-pack:${version.server}</location>
</feature-pack>
</feature-packs>
<layers>
<!-- layers may be used to customize the server to provision -->
<layer>cloud-server</layer>
<layer>ejb</layer>
</layers>
<packaging-scripts>
<packaging-script>
<scripts>
] <script>${basedir}/../configure-server.cli</script>
</scripts>
<!-- Expressions resolved during server execution -->
<resolve-expressions>false</resolve-expressions>
</packaging-script>
</packaging-scripts>
<!-- deploys the quickstart on root web context -->
<name>ROOT.war</name>
</configuration>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>integration-testing</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<includes>
<include>**/BasicRuntimeIT</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
69 changes: 69 additions & 0 deletions security-domain-to-domain/test/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
JBoss, Home of Professional Open Source
Copyright 2017, Red Hat, Inc. and/or its affiliates, and individual
contributors by the @authors tag. See the copyright.txt in the
distribution for a full listing of individual contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<!--
This pom builds the EAR artifact and includes the EJB and Web modules.
-->

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.wildfly.quickstarts</groupId>
<artifactId>security-domain-to-domain</artifactId>
<version>32.0.0.Beta1-SNAPSHOT</version>
</parent>
<artifactId>security-domain-to-domain-test</artifactId>

<name>Quickstart: security-domain-to-domain - test</name>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>integration-testing</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<includes>
<include>**/*IT</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
15 changes: 0 additions & 15 deletions security-domain-to-domain/web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,5 @@
<artifactId>jakarta.persistence-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<!-- WildFly plug-in to deploy the WAR -->
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 228e6a3

Please sign in to comment.