summaryrefslogtreecommitdiffstats
path: root/sandbox/lresende/sca-1.x/samples/store-secure-webapp/src/main/resources
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-01-13 02:16:12 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-01-13 02:16:12 +0000
commit83355a7557cf91c455a65e0ce79ea8dd4d880052 (patch)
tree25fb3c02f2eca9990323a3b9c03bc6028f73fb38 /sandbox/lresende/sca-1.x/samples/store-secure-webapp/src/main/resources
parent3e33ce505cf18f5f603f29cf0be4b4fd33053d3d (diff)
Refactoring sandbox structure to accomodate 1.x versus 2.x stuff
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@898623 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/lresende/sca-1.x/samples/store-secure-webapp/src/main/resources')
-rw-r--r--sandbox/lresende/sca-1.x/samples/store-secure-webapp/src/main/resources/definitions.xml73
-rw-r--r--sandbox/lresende/sca-1.x/samples/store-secure-webapp/src/main/resources/store.composite41
2 files changed, 114 insertions, 0 deletions
diff --git a/sandbox/lresende/sca-1.x/samples/store-secure-webapp/src/main/resources/definitions.xml b/sandbox/lresende/sca-1.x/samples/store-secure-webapp/src/main/resources/definitions.xml
new file mode 100644
index 0000000000..55789c8443
--- /dev/null
+++ b/sandbox/lresende/sca-1.x/samples/store-secure-webapp/src/main/resources/definitions.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<sca:definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+ xmlns:store="http://store">
+
+ <!-- PolicySets -->
+ <!-- sca:policySet xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="jsonRPCsecurityPolicy"
+ provides="sca:authentication"
+ appliesTo="tuscany:binding.jsonrpc">
+ <tuscany:authenticationConfiguration realm="ldap-realm"/>
+ </sca:policySet-->
+
+
+ <!-- PolicySets -->
+ <!-- policySet xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="JaasPolicy"
+ provides="tuscany:jaasAuthentication"
+ appliesTo="sca:implementation.java">
+
+ <tuscany:jaasAuthentication>
+ <tuscany:configurationName>ldap-realm</tuscany:configurationName>
+ <tuscany:callbackHandler>store.security.StoreCallbackHandler</tuscany:callbackHandler>
+ </tuscany:jaasAuthentication>
+ </policySet-->
+
+ <!-- PolicySets -->
+ <policySet xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="RealmBaseAuthenticationPolicy"
+ provides="sca:authentication"
+ appliesTo="sca:implementation.java">
+
+ <tuscany:ldapRealmAuthentication>
+ <tuscany:realm>ldap-realm</tuscany:realm>
+ <tuscany:realmConfigurationName>ldap-realm</tuscany:realmConfigurationName>
+ </tuscany:ldapRealmAuthentication>
+ </policySet>
+
+ <policySet xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="allowUser"
+ provides="sca:authorization"
+ appliesTo="sca:implementation.java">
+ <allow roles="user"/>
+ </policySet>
+
+ <policySet xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="allowManager"
+ provides="sca:authorization"
+ appliesTo="sca:implementation.java">
+ <allow roles="manager"/>
+ </policySet>
+
+ </sca:definitions> \ No newline at end of file
diff --git a/sandbox/lresende/sca-1.x/samples/store-secure-webapp/src/main/resources/store.composite b/sandbox/lresende/sca-1.x/samples/store-secure-webapp/src/main/resources/store.composite
new file mode 100644
index 0000000000..5c567cbd15
--- /dev/null
+++ b/sandbox/lresende/sca-1.x/samples/store-secure-webapp/src/main/resources/store.composite
@@ -0,0 +1,41 @@
+<?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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+ xmlns:s="http://store"
+ targetNamespace="http://store"
+ name="store">
+
+ <component name="Catalog">
+ <implementation.java class="services.FruitsCatalogImpl">
+ <operation name="get" policySets="allowManager" /> <!-- requires="authorization" policySets="allowManager" -->
+ </implementation.java>
+ <property name="currencyCode">USD</property>
+ <service name="Catalog">
+ <operation name="get" requires="authentication"/>
+ <tuscany:binding.jsonrpc/>
+ </service>
+ <reference name="currencyConverter" target="CurrencyConverter" />
+ </component>
+
+ <component name="CurrencyConverter">
+ <implementation.java class="services.CurrencyConverterImpl" />
+ </component>
+</composite>