001: /*
002: * $Id: ConfigurationConstants.java,v 1.5 2007/08/24 09:12:51 kumarjayanti Exp $
003: */
004:
005: /*
006: * The contents of this file are subject to the terms
007: * of the Common Development and Distribution License
008: * (the License). You may not use this file except in
009: * compliance with the License.
010: *
011: * You can obtain a copy of the license at
012: * https://glassfish.dev.java.net/public/CDDLv1.0.html.
013: * See the License for the specific language governing
014: * permissions and limitations under the License.
015: *
016: * When distributing Covered Code, include this CDDL
017: * Header Notice in each file and include the License file
018: * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
019: * If applicable, add the following below the CDDL Header,
020: * with the fields enclosed by brackets [] replaced by
021: * you own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
025: */
026:
027: package com.sun.xml.wss.impl.config;
028:
029: import com.sun.xml.wss.impl.MessageConstants;
030: import javax.xml.namespace.QName;
031: import com.sun.xml.wss.impl.configuration.*;
032:
033: /**
034: * @author XWS-Security Development Team
035: */
036: public interface ConfigurationConstants {
037:
038: public static final String CONFIGURATION_URL = "http://java.sun.com/xml/ns/xwss/config";
039: public static final String DEFAULT_CONFIGURATION_PREFIX = "xwss";
040:
041: // --- JAXRPC Security Configuration -- //
042: public static final String JAXRPC_SECURITY_ELEMENT_NAME = "JAXRPCSecurity";
043: public static final String SECURITY_ENVIRONMENT_HANDLER_ELEMENT_NAME = "SecurityEnvironmentHandler";
044: public static final String SERVICE_ELEMENT_NAME = "Service";
045: public static final String PORT_ELEMENT_NAME = "Port";
046: public static final String OPERATION_ELEMENT_NAME = "Operation";
047: public static final String NAME_ATTRIBUTE_NAME = "name";
048:
049: // 2.0 additions
050: public static final String OPTIMIZE_ATTRIBUTE_NAME = "optimize";
051: public static final String ID_ATTRIBUTE_NAME = "id"; // this one is to be used everywhere including UUID
052: public static final String CONFORMANCE_ATTRIBUTE_NAME = "conformance";
053: public static final String USECACHE_ATTRIBUTE_NAME = "useCache";
054:
055: public static final String BSP_CONFORMANCE = "bsp";
056:
057: public static final String RETAIN_SEC_HEADER = "retainSecurityHeader";
058:
059: // --- Declarative Configuration --
060: public static final String DECLARATIVE_CONFIGURATION_ELEMENT_NAME = "SecurityConfiguration";
061:
062: public static final String DUMP_MESSAGES_ATTRIBUTE_NAME = "dumpMessages";
063:
064: //2.0 addition
065: public static final String ENABLE_DYNAMIC_POLICY_ATTRIBUTE_NAME = "enableDynamicPolicy";
066:
067: // WSS 1.1 Policy
068: public static final String ENABLE_WSS11_POLICY_ATTRIBUTE_NAME = "enableWSS11Policy";
069:
070: //TODO: something used by config tool check and remove
071: public static final String SIGNED_TOKEN_REQUIRED_ATTRIBUTE_NAME = "signedTokenRequired";
072:
073: // OptionalTargets
074: public static final String OPTIONAL_TARGETS_ELEMENT_NAME = "OptionalTargets";
075:
076: // requireSignature
077: public static final String SIGNATURE_REQUIREMENT_ELEMENT_NAME = "RequireSignature";
078: public static final String TIMESTAMP_REQUIRED_ATTRIBUTE_NAME = "requireTimestamp";
079:
080: // requireEncryption
081: public static final String ENCRYPTION_REQUIREMENT_ELEMENT_NAME = "RequireEncryption";
082:
083: // requireUsernameToken
084: public static final String USERNAMETOKEN_REQUIREMENT_ELEMENT_NAME = "RequireUsernameToken";
085: public static final String NONCE_REQUIRED_ATTRIBUTE_NAME = "nonceRequired";
086: public static final String PASSWORD_DIGEST_REQUIRED_ATTRIBUTE_NAME = "passwordDigestRequired";
087:
088: // requireTimestamp
089: public static final String TIMESTAMP_REQUIREMENT_ELEMENT_NAME = "RequireTimestamp";
090:
091: // Timestamp
092: public static final String TIMESTAMP_ELEMENT_NAME = "Timestamp";
093: public static final String TIMEOUT_ATTRIBUTE_NAME = "timeout";
094:
095: // Sign
096: public static final String SIGN_OPERATION_ELEMENT_NAME = "Sign";
097: public static final String INCLUDE_TIMESTAMP_ATTRIBUTE_NAME = "includeTimestamp";
098:
099: // Encrypt
100: public static final String ENCRYPT_OPERATION_ELEMENT_NAME = "Encrypt";
101:
102: //2.0 addition
103: //SAML Assertion
104: public static final String SAML_ASSERTION_ELEMENT_NAME = "SAMLAssertion";
105: public static final String SAML_ASSERTION_TYPE_ATTRIBUTE_NAME = "type";
106: public static final String SAML_AUTHORITY_ID_ATTRIBUTE_NAME = "authorityId";
107: public static final String SAML_KEYIDENTIFIER_ATTRIBUTE_NAME = "keyIdentifier";
108:
109: public static final String SV_SAML_TYPE = "SV";
110: public static final String HOK_SAML_TYPE = "HOK";
111:
112: public static final String REQUIRE_SAML_ASSERTION_ELEMENT_NAME = "RequireSAMLAssertion";
113:
114: // X509Token
115: public static final String X509TOKEN_ELEMENT_NAME = "X509Token";
116: public static final String KEY_REFERENCE_TYPE_ATTRIBUTE_NAME = "keyReferenceType";
117: public static final String CERTIFICATE_ALIAS_ATTRIBUTE_NAME = "certificateAlias";
118: //2.0 addition
119: public static final String ENCODING_TYPE_ATTRIBUTE_NAME = "EncodingType";
120: public static final String VALUE_TYPE_ATTRIBUTE_NAME = "ValueType";
121:
122: // SymmetricKey
123: public static final String SYMMETRIC_KEY_ELEMENT_NAME = "SymmetricKey";
124: public static final String SYMMETRIC_KEY_ALIAS_ATTRIBUTE_NAME = "keyAlias";
125:
126: // Target
127: public static final String TARGET_ELEMENT_NAME = "Target";
128: public static final String TARGET_TYPE_ATTRIBUTE_NAME = "type";
129: public static final String CONTENT_ONLY_ATTRIBUTE_NAME = "contentOnly";
130: public static final String ENFORCE_ATTRIBUTE_NAME = "enforce";
131: public static final String TARGET_VALUE_SOAP_BODY = "SOAP-BODY";
132:
133: //2.0 addition
134: public static final String URI_TARGET = "uri";
135: public static final String QNAME_TARGET = "qname";
136: public static final String XPATH_TARGET = "xpath";
137:
138: public static final String ENCRYPTION_TARGET_ELEMENT_NAME = "EncryptionTarget";
139: public static final String SIGNATURE_TARGET_ELEMENT_NAME = "SignatureTarget";
140:
141: //2.0 addition
142: public static final String DIGEST_METHOD_ELEMENT_NAME = "DigestMethod";
143: public static final String CANONICALIZATION_METHOD_ELEMENT_NAME = "CanonicalizationMethod";
144: public static final String SIGNATURE_METHOD_ELEMENT_NAME = "SignatureMethod";
145: public static final String KEY_ENCRYPTION_METHOD_ELEMENT_NAME = "KeyEncryptionMethod";
146: public static final String DATA_ENCRYPTION_METHOD_ELEMENT_NAME = "DataEncryptionMethod";
147:
148: //2.0 addition
149: public static final String TRANSFORM_ELEMENT_NAME = "Transform";
150: public static final String ALGORITHM_PARAMETER_ELEMENT_NAME = "AlgorithmParameter";
151:
152: //2.0 addition
153: public static final String ALGORITHM_ATTRIBUTE_NAME = "algorithm";
154: public static final String VALUE_ATTRIBUTE_NAME = "value";
155: public static final String DISABLE_INCLUSIVE_PREFIX = "disableInclusivePrefix";
156:
157: // keyReferenceType
158: public static final String DIRECT_KEY_REFERENCE_TYPE = MessageConstants.DIRECT_REFERENCE_TYPE;
159: public static final String IDENTIFIER_KEY_REFERENCE_TYPE = MessageConstants.KEY_INDETIFIER_TYPE;
160: public static final String SERIAL_KEY_REFERENCE_TYPE = MessageConstants.X509_ISSUER_TYPE;
161: //2.0 addition
162: public static final String EMBEDDED_KEY_REFERENCE_TYPE = MessageConstants.EMBEDDED_REFERENCE_TYPE;
163:
164: // UsernamePassword
165: public static final String USERNAME_PASSWORD_AUTHENTICATION_ELEMENT_NAME = "UsernameToken";
166: public static final String USERNAME_ATTRIBUTE_NAME = "name";
167: public static final String PASSWORD_ATTRIBUTE_NAME = "password";
168: public static final String USE_NONCE_ATTRIBUTE_NAME = "useNonce";
169: public static final String DIGEST_PASSWORD_ATTRIBUTE_NAME = "digestPassword";
170:
171: public static final QName DECLARATIVE_CONFIGURATION_ELEMENT_QNAME = new QName(
172: CONFIGURATION_URL, DECLARATIVE_CONFIGURATION_ELEMENT_NAME);
173: public static final QName SIGN_OPERATION_ELEMENT_QNAME = new QName(
174: CONFIGURATION_URL, SIGN_OPERATION_ELEMENT_NAME);
175: public static final QName ENCRYPT_OPERATION_ELEMENT_QNAME = new QName(
176: CONFIGURATION_URL, ENCRYPT_OPERATION_ELEMENT_NAME);
177: public static final QName TARGET_QNAME = new QName(
178: CONFIGURATION_URL, TARGET_ELEMENT_NAME);
179: public static final QName TIMESTAMP_ELEMENT_QNAME = new QName(
180: CONFIGURATION_URL, TIMESTAMP_ELEMENT_NAME);
181: public static final QName X509TOKEN_ELEMENT_QNAME = new QName(
182: CONFIGURATION_URL, X509TOKEN_ELEMENT_NAME);
183: public static final QName SYMMETRIC_KEY_ELEMENT_QNAME = new QName(
184: CONFIGURATION_URL, SYMMETRIC_KEY_ELEMENT_NAME);
185: public static final QName USERNAME_PASSWORD_AUTHENTICATION_ELEMENT_QNAME = new QName(
186: CONFIGURATION_URL,
187: USERNAME_PASSWORD_AUTHENTICATION_ELEMENT_NAME);
188: public static final QName TIMESTAMP_REQUIREMENT_ELEMENT_QNAME = new QName(
189: CONFIGURATION_URL, TIMESTAMP_REQUIREMENT_ELEMENT_NAME);
190: public static final QName SIGNATURE_REQUIREMENT_ELEMENT_QNAME = new QName(
191: CONFIGURATION_URL, SIGNATURE_REQUIREMENT_ELEMENT_NAME);
192: public static final QName ENCRYPTION_REQUIREMENT_ELEMENT_QNAME = new QName(
193: CONFIGURATION_URL, ENCRYPTION_REQUIREMENT_ELEMENT_NAME);
194: public static final QName USERNAMETOKEN_REQUIREMENT_ELEMENT_QNAME = new QName(
195: CONFIGURATION_URL, USERNAMETOKEN_REQUIREMENT_ELEMENT_NAME);
196: public static final QName OPTIONAL_TARGETS_ELEMENT_QNAME = new QName(
197: CONFIGURATION_URL, OPTIONAL_TARGETS_ELEMENT_NAME);
198: public static final QName JAXRPC_SECURITY_ELEMENT_QNAME = new QName(
199: CONFIGURATION_URL, JAXRPC_SECURITY_ELEMENT_NAME);
200: public static final QName SERVICE_ELEMENT_QNAME = new QName(
201: CONFIGURATION_URL, SERVICE_ELEMENT_NAME);
202: public static final QName SECURITY_ENVIRONMENT_HANDLER_ELEMENT_QNAME = new QName(
203: CONFIGURATION_URL,
204: SECURITY_ENVIRONMENT_HANDLER_ELEMENT_NAME);
205: public static final QName PORT_ELEMENT_QNAME = new QName(
206: CONFIGURATION_URL, PORT_ELEMENT_NAME);
207: public static final QName OPERATION_ELEMENT_QNAME = new QName(
208: CONFIGURATION_URL, OPERATION_ELEMENT_NAME);
209:
210: //2.0 additions
211: public static final QName SAML_ELEMENT_QNAME = new QName(
212: CONFIGURATION_URL, SAML_ASSERTION_ELEMENT_NAME);
213: public static final QName SAML_REQUIREMENT_ELEMENT_QNAME = new QName(
214: CONFIGURATION_URL, REQUIRE_SAML_ASSERTION_ELEMENT_NAME);
215:
216: //2.0 addition
217: public static final QName ENCRYPTION_TARGET_ELEMENT_QNAME = new QName(
218: CONFIGURATION_URL, ENCRYPTION_TARGET_ELEMENT_NAME);
219:
220: public static final QName SIGNATURE_TARGET_ELEMENT_QNAME = new QName(
221: CONFIGURATION_URL, SIGNATURE_TARGET_ELEMENT_NAME);
222:
223: //2.0 addition
224: public static final QName DIGEST_METHOD_ELEMENT_QNAME = new QName(
225: CONFIGURATION_URL, DIGEST_METHOD_ELEMENT_NAME);
226:
227: public static final QName CANONICALIZATION_METHOD_ELEMENT_QNAME = new QName(
228: CONFIGURATION_URL, CANONICALIZATION_METHOD_ELEMENT_NAME);
229:
230: public static final QName SIGNATURE_METHOD_ELEMENT_QNAME = new QName(
231: CONFIGURATION_URL, SIGNATURE_METHOD_ELEMENT_NAME);
232:
233: public static final QName KEY_ENCRYPTION_METHOD_ELEMENT_QNAME = new QName(
234: CONFIGURATION_URL, KEY_ENCRYPTION_METHOD_ELEMENT_NAME);
235:
236: public static final QName DATA_ENCRYPTION_METHOD_ELEMENT_QNAME = new QName(
237: CONFIGURATION_URL, DATA_ENCRYPTION_METHOD_ELEMENT_NAME);
238:
239: //2.0 addition
240: public static final QName TRANSFORM_ELEMENT_QNAME = new QName(
241: CONFIGURATION_URL, TRANSFORM_ELEMENT_NAME);
242:
243: public static final QName ALGORITHM_PARAMETER_ELEMENT_QNAME = new QName(
244: CONFIGURATION_URL, ALGORITHM_PARAMETER_ELEMENT_NAME);
245:
246: //2.0 addition
247: public static final String DEFAULT_DATA_ENC_ALGO = "http://www.w3.org/2001/04/xmlenc#tripledes-cbc";
248: public static final String DEFAULT_KEY_ENC_ALGO = "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p";
249:
250: // 2.0 addition
251: public static final String MAX_NONCE_AGE = "maxNonceAge";
252: public static final String MAX_CLOCK_SKEW = "maxClockSkew";
253: public static final String TIMESTAMP_FRESHNESS_LIMIT = "timestampFreshnessLimit";
254: public static final String STRID = "strId";
255: }
|