001/** 002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 003 * 004 * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved 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://opensso.dev.java.net/public/CDDLv1.0.html or 013 * opensso/legal/CDDLv1.0.txt 014 * See the License for the specific language governing 015 * permission and limitations under the License. 016 * 017 * When distributing Covered Code, include this CDDL 018 * Header Notice in each file and include the License file 019 * at opensso/legal/CDDLv1.0.txt. 020 * If applicable, add the following below the CDDL Header, 021 * with the fields enclosed by brackets [] replaced by 022 * your own identifying information: 023 * "Portions Copyrighted [year] [name of copyright owner]" 024 * 025 * $Id: XACMLConstants.java,v 1.5 2009/09/22 23:00:15 madan_ranganath Exp $ 026 * 027 */ 028 029package com.sun.identity.xacml.common; 030 031/** 032 * This interface defines constants common to all XACML elements. 033 * 034 * @supported.all.api 035 */ 036public class XACMLConstants { 037 038 /** 039 * Constant for SAML namespace URI 040 */ 041 public static String SAML_NS_URI 042 = "urn:oasis:names:tc:SAML:2.0:assertion"; 043 044 /** 045 * Constant for SAML namespace prefix 046 */ 047 public static String SAML_NS_PREFIX = "saml:"; 048 049 /** 050 * Constant for SAML namespace declaration URI 051 */ 052 public static String SAML_NS_DECLARATION 053 = " xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\" "; 054 055 /** 056 * Constant for SAML2 protocol namespace URI 057 */ 058 public static String SAMLP_NS_URI = 059 "urn:oasis:names:tc:SAML:2.0:protocol"; 060 061 /** 062 * Constant for SAML2 Protocol namespace prefix 063 */ 064 public static String SAMLP_NS_PREFIX = "samlp:"; 065 066 /** 067 * Constant for SAML2 protocol namespace declaration 068 */ 069 public static String SAMLP_NS_DECLARATION = 070 " xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\""; 071 072 /** 073 * Constant for xacml-saml namespace URI 074 */ 075 public final static String XACML_SAML_NS_URI 076 = "urn:oasis:names:tc:xacml:2.0:saml:assertion:schema:os"; 077 /** 078 * Constant for xacml-saml namespace prefix 079 */ 080 public final static String XACML_SAML_NS_PREFIX 081 = " xacml-saml:"; 082 083 /** 084 * Constant for xacml-saml namespace declaration 085 */ 086 public final static String XACML_SAML_NS_DECLARATION 087 = " xmlns:xacml-saml=\"urn:oasis:names:tc:xacml:2.0:saml:assertion:schema:os\" "; 088 089 /** 090 * Constant for XACML SAML2 protocol namespace URI 091 */ 092 public static String XACML_SAMLP_NS_URI = 093 "urn:oasis:xacml:2.0:saml:protocol:schema:os"; 094 095 /** 096 * Constant for XACML SAML2 Protocol namespace prefix. 097 */ 098 public static String XACML_SAMLP_NS_PREFIX = "xacml-samlp:"; 099 100 /** 101 * Constant for XACML SAML2 protocol namespace declaration 102 */ 103 public static String XACML_SAMLP_NS_DECLARATION = 104 " xmlns:xacml-samlp=\"urn:oasis:xacml:2.0:saml:protocol:schema:os\" "; 105 106 /** 107 * Constant for XACML policy namespace URI 108 */ 109 public static String XACML_NS_URI = 110 "urn:oasis:names:tc:xacml:2.0:policy:schema:os"; 111 112 /** 113 * Constant for XACML policy namespace prefix 114 */ 115 public static String XACML_NS_PREFIX = "xacml"; 116 117 /** 118 * Constant for XACML policy namespace declaration 119 */ 120 public static String XACML_NS_DECLARATION = 121 " xmlns:xacml=\"urn:oasis:names:tc:xacml:2.0:policy:schema:os\" "; 122 123 /** 124 * Constant for XACML context namespace URI 125 */ 126 public static String CONTEXT_NS_URI = 127 "urn:oasis:names:tc:xacml:2.0:context:schema:os"; 128 129 /** 130 * Constant for XACML context namespace prefix 131 */ 132 public static String CONTEXT_NS_PREFIX = "xacml-context"; 133 134 /** 135 * Constant for XACML context namespace declaration 136 */ 137 public static String CONTEXT_NS_DECLARATION = 138 " xmlns:xacml-context=\"urn:oasis:names:tc:xacml:2.0:context:schema:os\" "; 139 140 /* 141 * Constant for XMLSchema-instance URI 142 */ 143 public static String XSI_NS_URI = 144 "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""; 145 146 /** 147 * Constant for xsi name space delcaration 148 */ 149 public final static String XSI_NS_DECLARATION 150 = " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "; 151 152 /** 153 * Constant for xsi:type="xacml-samlp:XACMLAuthzDecisionQuery 154 */ 155 public final static String XSI_TYPE_XACML_AUTHZ_DECISION_QUERY 156 = " xsi:type=\"xacml-samlp:XACMLAuthzDecisionQuery\""; 157 158 /** 159 * XACML context schema location 160 */ 161 public static String CONTEXT_SCHEMA_LOCATION= 162 "xsi:schemaLocation=\"urn:oasis:names:tc:xacml:2.0:context:schema:os http:" 163 +"//docs.oasis-open.org/xacml/access_control-xacml" 164 +"-2.0-context-schema-os.xsd\""; 165 166 /** 167 * Constant for RequestAbstract 168 */ 169 public static String REQUEST_ABSTRACT = 170 "RequestAbstract"; 171 172 /** 173 * Constant for XACMLAuthzDecisionQuery 174 */ 175 public static String XACML_AUTHZ_DECISION_QUERY = 176 "XACMLAuthzDecisionQuery"; 177 178 /** 179 * Constant for xsi:type 180 */ 181 public final static String XSI_TYPE_XACML_AUTHZ_DECISION_STATEMENT 182 = " xsi:type=\"xacml-saml:XACMLAuthzDecisionStatement\""; 183 184 /** 185 * Constant for Request 186 */ 187 public static String REQUEST = "Request"; 188 189 /** 190 * Constant for Subject 191 */ 192 public static String SUBJECT = "Subject"; 193 194 /** 195 * Constant for SubjectCategory element 196 */ 197 public static String SUBJECT_CATEGORY = "SubjectCategory"; 198 199 /** 200 * Constant for AttributeValue element 201 */ 202 203 /** 204 * Constant for Resource element 205 */ 206 public static String RESOURCE = "Resource"; 207 208 /** 209 * Constant for ResourceContent element 210 */ 211 public static String RESOURCE_CONTENT = "ResourceContent"; 212 213 /** 214 * Constant for Action element 215 */ 216 public static String ACTION = "Action"; 217 218 219 /** 220 * Constant for Environment element 221 */ 222 public static String ENVIRONMENT = "Environment"; 223 224 /** 225 * Constant for Attribute element 226 */ 227 public static String ATTRIBUTE = "Attribute"; 228 229 /** 230 * Constant for AttributeId element 231 */ 232 public static String ATTRIBUTE_ID ="AttributeId"; 233 234 /** 235 * Constant for DataType element 236 */ 237 public static String DATATYPE ="DataType"; 238 239 /** 240 * Constant for Issuer element 241 */ 242 public static String ISSUER ="Issuer"; 243 244 /** 245 * Constant for AttributeValue element 246 */ 247 public static String ATTRIBUTE_VALUE = "AttributeValue"; 248 249 /** 250 * Constant for SAML Statement 251 */ 252 public final static String SAML_STATEMENT 253 = "Statement"; 254 255 /* 256 * Constant for XACMLAuthzDecisionStatementElement 257 */ 258 public final static String XACML_AUTHZ_DECISION_STATEMENT 259 = "XACMLAuthzDecisionStatement"; 260 261 /** 262 * Constant for InputContextOnly attribute 263 */ 264 public static String INPUT_CONTEXT_ONLY ="InputContextOnly"; 265 266 /** 267 * Constant for ReturnContext attribute 268 */ 269 public static String RETURN_CONTEXT ="ReturnContext"; 270 271 /** 272 * Constant for Response element 273 */ 274 public static final String RESPONSE = "Response"; 275 276 /** 277 * Constant for Result element 278 */ 279 public static final String RESULT = "Result"; 280 281 /** 282 * Constant for ResourceId attribute 283 */ 284 public static final String RESOURCE_ID = "ResourceId"; 285 286 /** 287 * Constant for Decision element 288 */ 289 public static final String DECISION = "Decision"; 290 291 /** 292 * Constant for Status element 293 */ 294 public static final String STATUS = "Status"; 295 296 /** 297 * Constant for StatusCode element 298 */ 299 public static final String STATUS_CODE = "StatusCode"; 300 301 /** 302 * Constant for Value attribute 303 */ 304 public static final String VALUE = "Value"; 305 306 /** 307 * Constant for StatusMessage element 308 */ 309 public static final String STATUS_MESSAGE = "StatusMessage"; 310 311 /** 312 * Constant for StatusDetail element 313 */ 314 public final static String STATUS_DETAIL = "StatusDetail"; 315 316 /** 317 * Constant for Permit 318 */ 319 public static final String PERMIT = "Permit"; 320 321 /** 322 * Constant for Deny 323 */ 324 public static final String DENY = "Deny"; 325 326 /** 327 * Constant for Indeterminate 328 */ 329 public static final String INDETERMINATE = "Indeterminate"; 330 331 /** 332 * Constant for NotApplicable 333 */ 334 public static final String NOT_APPLICABLE = "NotApplicable"; 335 336 /** 337 * Constant for Obligations 338 */ 339 public static String OBLIGATIONS = "Obligations"; 340 341 /** 342 * Constant for Obligation 343 */ 344 public static String OBLIGATION = "Obligation"; 345 346 /** 347 * Constant for ObligationId 348 */ 349 public static String OBLIGATION_ID = "ObligationId"; 350 351 /** 352 * Constant for AttributeAssignment 353 */ 354 public static String ATTRIBUTE_ASSIGNMENT = "AttributeAssignment"; 355 356 /** 357 * Constant for FulfillOn 358 */ 359 public static String FULFILL_ON = "FulfillOn"; 360 361 /** 362 * Constant for DataType 363 */ 364 public static String DATA_TYPE = "DataType"; 365 366 /** 367 * Constant for EffectType 368 */ 369 public static String EFFECT_TYPE = "EffectType"; 370 371 /** 372 * Constant for access-subject URI 373 */ 374 public static String ACCESS_SUBJECT = 375 "urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"; 376 377 /** 378 * Constant for intemediray-subject URI 379 */ 380 public static String INTERMEDIARY_SUBJECT = 381 "urn:oasis:names:tc:xacml:1.0:subject-category:intermediary-subject"; 382 383 /** 384 * Constant for subject-id URI 385 */ 386 public static String SUBJECT_ID = 387 "urn:oasis:names:tc:xacml:1.0:subject:subject-id"; 388 389 /** 390 * Constant for resource-id URI 391 */ 392 public static String RESOURCE_ID_URI = 393 "urn:oasis:names:tc:xacml:1.0:resource:resource-id"; 394 395 /** 396 * Constant for action-id URI 397 */ 398 public static String ACTION_ID = 399 "urn:oasis:names:tc:xacml:1.0:action:action-id"; 400 401 /** 402 * Constant for opensso-session-id URI 403 */ 404 public static String OPENSSO_SESSION_ID = 405 "urn:sun:names:xacml:2.0:data-type:opensso-session-id"; 406 407 /** 408 * Constant for saml2-nameid URI 409 */ 410 public static String SAML2_NAMEID = 411 "urn:sun:names:xacml:2.0:data-type:saml2-nameid"; 412 413 /** 414 * Constant for resource:target-service URI 415 */ 416 public static String TARGET_SERVICE = 417 "urn:sun:names:xacml:2.0:resource:target-service"; 418 419 /** 420 * Constant for x500name URI 421 */ 422 public static String X500NAME = 423 "urn:oasis:names:tc:xacml:1.0:data-type:x500Name"; 424 425 /** 426 * Constant for XMLSchema#String URI 427 */ 428 public static String XS_STRING = 429 "http://www.w3.org/2001/XMLSchema#string"; 430 431 /** 432 * Constant key for XACML SDK class mapping 433 */ 434 public static String SDK_CLASS_MAPPING = 435 "com.sun.identity.xacml.sdk.mapping."; 436 437 /** 438 * Constant for subject-category URI 439 */ 440 public static String SUBJECT_CATEGORY_ID = 441 "urn:oasis:names:tc:xacml:1.0:subject-category"; 442 443 /** 444 * Constant for status code: ok URI 445 */ 446 public static final String STATUS_CODE_OK 447 = "urn:oasis:names:tc:xacml:1.0:status:ok"; 448 449 /** 450 * Constant for status code: missing-attribute URI 451 */ 452 public static final String STATUS_CODE_MISSING_ATTRIBUTE 453 = "urn:oasis:names:tc:xacml:1.0:status:missing-attribute"; 454 455 /** 456 * Constant for status code: syntax-error URI 457 */ 458 public static final String STATUS_CODE_SYNTAX_ERROR 459 = "urn:oasis:names:tc:xacml:1.0:status:syntax-error"; 460 461 /** 462 * Constant for status code: processing-error URI 463 */ 464 public static final String STATUS_CODE_PROCESSING_ERROR 465 = "urn:oasis:names:tc:xacml:1.0:status:processing-error"; 466 467 /** 468 * Constant for space 469 */ 470 public static String SPACE= " "; 471 472}