geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r772536 - in /geronimo/sandbox/djencks/samples/security/obscured-pw-ds: ./ pom.xml src/ src/main/ src/main/plan/ src/main/plan/plan.xml
Date Thu, 07 May 2009 07:59:40 GMT
Author: djencks
Date: Thu May  7 07:59:36 2009
New Revision: 772536

URL: http://svn.apache.org/viewvc?rev=772536&view=rev
Log:
sample of how to obscure a datasource password using a plugin

Added:
    geronimo/sandbox/djencks/samples/security/obscured-pw-ds/
    geronimo/sandbox/djencks/samples/security/obscured-pw-ds/pom.xml   (with props)
    geronimo/sandbox/djencks/samples/security/obscured-pw-ds/src/
    geronimo/sandbox/djencks/samples/security/obscured-pw-ds/src/main/
    geronimo/sandbox/djencks/samples/security/obscured-pw-ds/src/main/plan/
    geronimo/sandbox/djencks/samples/security/obscured-pw-ds/src/main/plan/plan.xml   (with
props)

Added: geronimo/sandbox/djencks/samples/security/obscured-pw-ds/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/samples/security/obscured-pw-ds/pom.xml?rev=772536&view=auto
==============================================================================
--- geronimo/sandbox/djencks/samples/security/obscured-pw-ds/pom.xml (added)
+++ geronimo/sandbox/djencks/samples/security/obscured-pw-ds/pom.xml Thu May  7 07:59:36 2009
@@ -0,0 +1,199 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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">
+
+    <parent>
+        <groupId>org.apache.geronimo</groupId>
+        <artifactId>geronimo</artifactId>
+        <version>2.1.4</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.geronimo.samples</groupId>
+    <artifactId>obscured-pw-ds</artifactId>
+    <version>2.1.4-SNAPSHOT</version>
+    <packaging>car</packaging>
+
+    <properties>
+        <!-- This property is required by the car:package mojo -->
+        <geronimoVersion>2.1.4-SNAPSHOT</geronimoVersion>
+
+        <gbeanDeployer>org.apache.geronimo.framework/geronimo-gbean-deployer/${geronimoVersion}/car</gbeanDeployer>
+        <j2eeDeployer>org.apache.geronimo.configs/j2ee-deployer/${geronimoVersion}/car</j2eeDeployer>
+        <connectorDeployer>org.apache.geronimo.configs/connector-deployer/${geronimoVersion}/car</connectorDeployer>
+    </properties>
+
+
+    <dependencies>
+        <!-- if you are deploying a jee application, use scope provided -->
+        <!-- other dependencies will normally end up as dependencies in the plan and geronimo-plugin.xml
-->
+        <!-- include dependencies on all deployer modules needed, with scope provided
-->
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>connector-deployer</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>derby</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>transaction</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-derby</artifactId>
+            <version>${geronimoVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.tranql</groupId>
+            <artifactId>tranql-connector-derby-client-xa</artifactId>
+            <type>rar</type>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+
+                <plugin>
+                    <groupId>org.apache.geronimo.buildsupport</groupId>
+                    <artifactId>car-maven-plugin</artifactId>
+                    <version>${geronimoVersion}</version>
+                    <extensions>true</extensions>
+                    <configuration>
+                        <!-- where in plugin catalog this should go -->
+                        <category>Samples</category>
+                    </configuration>
+                </plugin>
+
+            </plugins>
+        </pluginManagement>
+
+        <plugins>
+            <plugin>
+                <artifactId>maven-enforcer-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.geronimo.genesis.plugins</groupId>
+                <artifactId>tools-maven-plugin</artifactId>
+
+                <!-- Tools includes custom packagings, install as extension to pick them
up -->
+                <extensions>true</extensions>
+
+                <executions>
+                    <execution>
+                        <id>install-legal-files</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>copy-legal-files</goal>
+                        </goals>
+                        <configuration>
+                            <!-- Fail the build if no legal files were copied -->
+                            <strict>false</strict>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>verify-legal-files</id>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>verify-legal-files</goal>
+                        </goals>
+                        <configuration>
+                            <!-- Fail the build if no legal files were found -->
+                            <strict>false</strict>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.geronimo.buildsupport</groupId>
+                <artifactId>car-maven-plugin</artifactId>
+                <configuration>
+                    <deploymentConfigs>
+                        <!-- gbean deployer is default.  For jee apps include all deployers
your app needs, see properties -->
+                        <deploymentConfig>${connectorDeployer}</deploymentConfig>
+                        <!--<deploymentConfig>${j2eeDeployer}</deploymentConfig>-->
+                        <!--<deploymentConfig>${jetty6Deployer}</deploymentConfig>-->
+                        <!--<deploymentConfig>${jasperDeployer}</deploymentConfig>-->
+                        <!--<deploymentConfig>${jpaDeployer}</deploymentConfig>-->
+                    </deploymentConfigs>
+                    <module>
+                        <groupId>org.tranql</groupId>
+                        <artifactId>tranql-connector-derby-client-xa</artifactId>
+                        <type>rar</type>
+                    </module>
+                    <!-- Normally you can use the maven dependencies unaltered.  If you
need to specify import scope
+                     you can list the dependencies here as you want them in the plan.xml
-->
+                    <useMavenDependencies>
+                        <value>true</value>
+                        <includeVersion>true</includeVersion>
+                    </useMavenDependencies>
+                    <!-- the instance sets up most of the optional geronimo-plugin.xml
content -->
+                    <instance>
+                        <plugin-artifact>
+                            <!-- prerequisites prevent your module from being installed
unless already present -->
+                            <!--
+                                                        <prerequisite>
+                                                            <id>
+                                                                <groupId>mysql</groupId>
+                                                                <artifactId>mysql-connector-java</artifactId>
+                                                                <version>3.1.12</version>
+                                                                <type>jar</type>
+                                                            </id>
+                                                            <resource-type>Database
Connector</resource-type>
+                                                            <description>
+                                                                (why this can't be installed
as a dependency)
+                                                            </description>
+                                                        </prerequisite>
+                            -->
+                            <!-- extract stuff from the car to the specified location
(good for config info -->
+                            <!--<copy-file relative-to="server" dest-dir="var/roller-data">themes</copy-file>-->
+                            <!-- content that should go into var/config/config.xml for
module customization -->
+                            <!-- note the variable ${RollerContextPath} which is further
specified in var/config/config-substitutions.properties -->
+                            <config-xml-content server="default">
+                                <gbean name="org.apache.geronimo.samples/obscured-pw-ds/2.1.4-SNAPSHOT/car?J2EEApplication=null,JCAConnectionFactory=TxDatasource,JCAResource=org.apache.geronimo.samples/obscured-pw-ds/2.1.4-SNAPSHOT/car,ResourceAdapter=org.apache.geronimo.samples/obscured-pw-ds/2.1.4-SNAPSHOT/car,ResourceAdapterModule=org.apache.geronimo.samples/obscured-pw-ds/2.1.4-SNAPSHOT/car,j2eeType=JCAManagedConnectionFactory,name=TxDatasource">
+                                    <attribute name="Password">{Simple}rO0ABXNyABlqYXZheC5jcnlwdG8uU2VhbGVkT2JqZWN0PjY9psO3VHACAARbAA1lbmNvZGVkUGFyYW1zdAACW0JbABBlbmNyeXB0ZWRDb250ZW50cQB+AAFMAAlwYXJhbXNBbGd0ABJMamF2YS9sYW5nL1N0cmluZztMAAdzZWFsQWxncQB+AAJ4cHB1cgACW0Ks8xf4BghU4AIAAHhwAAAAEH9LTctGneYS8dglaxWo78NwdAADQUVT</attribute>
+                                </gbean>
+                                <gbean name="org.apache.geronimo.samples/obscured-pw-ds/2.1.4-SNAPSHOT/car?J2EEApplication=null,JCAConnectionFactory=NoTxDatasource,JCAResource=org.apache.geronimo.samples/obscured-pw-ds/2.1.4-SNAPSHOT/car,ResourceAdapter=org.apache.geronimo.samples/obscured-pw-ds/2.1.4-SNAPSHOT/car,ResourceAdapterModule=org.apache.geronimo.samples/obscured-pw-ds/2.1.4-SNAPSHOT/car,j2eeType=JCAManagedConnectionFactory,name=NoTxDatasource">
+                                    <attribute name="Password">{Simple}rO0ABXNyABlqYXZheC5jcnlwdG8uU2VhbGVkT2JqZWN0PjY9psO3VHACAARbAA1lbmNvZGVkUGFyYW1zdAACW0JbABBlbmNyeXB0ZWRDb250ZW50cQB+AAFMAAlwYXJhbXNBbGd0ABJMamF2YS9sYW5nL1N0cmluZztMAAdzZWFsQWxncQB+AAJ4cHB1cgACW0Ks8xf4BghU4AIAAHhwAAAAEH9LTctGneYS8dglaxWo78NwdAADQUVT</attribute>
+                                </gbean>
+                            </config-xml-content>
+                        </plugin-artifact>
+                    </instance>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Propchange: geronimo/sandbox/djencks/samples/security/obscured-pw-ds/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/djencks/samples/security/obscured-pw-ds/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/djencks/samples/security/obscured-pw-ds/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/sandbox/djencks/samples/security/obscured-pw-ds/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/samples/security/obscured-pw-ds/src/main/plan/plan.xml?rev=772536&view=auto
==============================================================================
--- geronimo/sandbox/djencks/samples/security/obscured-pw-ds/src/main/plan/plan.xml (added)
+++ geronimo/sandbox/djencks/samples/security/obscured-pw-ds/src/main/plan/plan.xml Thu May
 7 07:59:36 2009
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-${geronimoSchemaVersion}">
+
+    <resourceadapter>
+        <outbound-resourceadapter>
+            <connection-definition>
+                <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
+                <connectiondefinition-instance>
+                    <name>TxDatasource</name>
+                    <config-property-setting name="UserName">cts</config-property-setting>
+                    <config-property-setting name="Password"></config-property-setting>
+                    <config-property-setting name="DatabaseName">SampleDatabase</config-property-setting>
+                    <config-property-setting name="CreateDatabase">true</config-property-setting>
+                    <connectionmanager>
+                        <xa-transaction>
+                            <transaction-caching/>
+                        </xa-transaction>
+                        <single-pool>
+                            <max-size>100</max-size>
+                            <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+                            <select-one-assume-match/>
+                        </single-pool>
+                    </connectionmanager>
+                </connectiondefinition-instance>
+                <connectiondefinition-instance>
+                    <name>NoTxDatasource</name>
+                    <config-property-setting name="UserName">cts</config-property-setting>
+                    <config-property-setting name="Password"></config-property-setting>
+                    <config-property-setting name="DatabaseName">SampleDatabase</config-property-setting>
+                    <config-property-setting name="CreateDatabase">true</config-property-setting>
+                    <connectionmanager>
+                        <no-transaction/>
+                        <single-pool>
+                            <max-size>100</max-size>
+                            <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+                            <select-one-assume-match/>
+                        </single-pool>
+                    </connectionmanager>
+                </connectiondefinition-instance>
+            </connection-definition>
+        </outbound-resourceadapter>
+    </resourceadapter>
+
+
+</connector>

Propchange: geronimo/sandbox/djencks/samples/security/obscured-pw-ds/src/main/plan/plan.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/djencks/samples/security/obscured-pw-ds/src/main/plan/plan.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/djencks/samples/security/obscured-pw-ds/src/main/plan/plan.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message