{"id":5001,"date":"2012-07-06T22:58:44","date_gmt":"2012-07-07T03:58:44","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=5001"},"modified":"2012-08-25T23:08:42","modified_gmt":"2012-08-26T04:08:42","slug":"1z1-102-security-concepts-and-configuration","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=5001","title":{"rendered":"WebLogic 11g Security Concepts and Configuration"},"content":{"rendered":"<p><< Previous\n\n[toc depth=\"3\"]\n\n\n\n<span id=\"Describe_a_WebLogic_Server_security_realm\"><h2>Describe a WebLogic Server security realm<\/h2><\/span>\n<p>* <a href=\"http:\/\/docs.oracle.com\/cd\/E17904_01\/web.1111\/e13710\/realm_chap.htm#i1031639\">Security Realms<\/a><\/p>\n<span id=\"Overview\"><h3>Overview<\/h3><\/span>\n<span id=\"\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm-300x122.jpg\" alt=\"\" title=\"wlscert_sec_realm\" width=\"300\" height=\"122\" class=\"aligncenter size-medium wp-image-5002\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm-300x122.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm.jpg 550w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Security realm protects WL resources<br \/>\n* Each realm consists of a set of configured:<br \/>\n&#8211; security providers<br \/>\n&#8211; users: can be person or software entity<br \/>\n&#8211; groups: logically ordered set of users. Scoped to entire WLS domain.<br \/>\n&#8211; security roles:<br \/>\n~ privileges granted to user or group based on <strong>specific condition<\/strong><br \/>\n~ are computed and granted dynamically<br \/>\n~ can be scoped to specific WL resources<br \/>\n&#8211; security policies:<br \/>\n~ an association between a WL resource and one or more users, groups, or security roles<br \/>\n~ protect against unauthorized access<br \/>\n* A user must be defined in sec realm in order to access any WL resources belonging to that realm<\/p>\n<span id=\"Security_Provider_Database\"><h3>Security Provider Database<\/h3><\/span>\n<p>* Contains:<br \/>\n&#8211; Users<br \/>\n&#8211; Groups<br \/>\n&#8211; Sec roles<br \/>\n&#8211; Sec policies<br \/>\n&#8211; Credentials<br \/>\n* Can be:<br \/>\n&#8211; Embedded LDAP<br \/>\n&#8211; A property file<br \/>\n&#8211; Database<br \/>\n* Need to be initialized with default:<br \/>\n&#8211; Groups<br \/>\n&#8211; Sec roles<br \/>\n&#8211; Sec policies<br \/>\n* RDBMS sec store is needed for:<br \/>\n&#8211; XACML authn and role mapping providers<br \/>\n&#8211; WL Credential Mapping provider<br \/>\n&#8211; PKI Credential Mapping providers<br \/>\n&#8211; SAML 1.1 Identity Assertion provider v2, SAML 1.1 Credential Mapping provider v2<br \/>\n&#8211; SAML 2.0 Identity Assertion provider, SAMl 2.0 Credential Mapping provider<br \/>\n&#8211; Default certificate registry<\/p>\n<span id=\"Security_Providers\"><h3>Security Providers<\/h3><\/span>\n<p>* Modules that provide security services to applications<br \/>\n* See <a href=\"?p=4154\">this post<\/a><\/p>\n<span id=\"_1\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_providers.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_providers-300x224.jpg\" alt=\"\" title=\"wlscert_sec_realm_providers\" width=\"300\" height=\"224\" class=\"aligncenter size-medium wp-image-5016\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_providers-300x224.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_providers.jpg 515w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Authentication_Providers\"><h4>Authentication Providers<\/h4><\/span>\n<p>* 1 or more per realm<br \/>\n* Supports:<br \/>\n&#8211; username\/password<br \/>\n&#8211; certificate<br \/>\n&#8211; digest<br \/>\n* An Identity Assertion provider is a special type of Authentication provider and handles perimeter authentication and multiple sec token types and protocols.<br \/>\n* Login Modules perform actual authentication of a user or system<br \/>\n* Uses Principal Validation provider for signing and verifying principal authenticity<\/p>\n<span id=\"Identity_Assertion_Providers\"><h4>Identity Assertion Providers<\/h4><\/span>\n<p>* 1 or more per realm<br \/>\n* Establish client identity using client supplied tokens, i.e. validate and map a token to username<br \/>\n* Enable perimeter authentication and SSO<br \/>\n* Support multiple token types (one token type per provider): Digest, SPNEGO, and SAML (1.1, 2.0)<br \/>\n* Can handle multiple sec protocols: Kerberos, SOAP, IIOP-CSIv2<\/p>\n<span id=\"Principal_Validation_Providers\"><h4>Principal Validation Providers<\/h4><\/span>\n<p>* One Principal Validation provider per Authentication provider<br \/>\n* For Signing and verifying authenticity of principals<br \/>\n* Configured indirectly from the configuration of Authentication providers<\/p>\n<span id=\"Authorization_Providers\"><h4>Authorization Providers<\/h4><\/span>\n<p>* 1 or more per realm<br \/>\n* Controls access to WL resources based on sec policies<br \/>\n* Achieved by <strong>Access Decision<\/strong><br \/>\n* Bulk access versions:<br \/>\n&#8211; BulkAuthorizationProvider<br \/>\n&#8211; BulkAccessDecision<br \/>\n* Return<br \/>\n&#8211; PERMIT<br \/>\n&#8211; DENY<br \/>\n&#8211; ABSTAIN<\/p>\n<span id=\"Adjudication_Providers\"><h4>Adjudication Providers<\/h4><\/span>\n<p>* Needed only for multiple Authorization Providers<br \/>\n* Resolves authorization conflicts from multiple Authorization Providers<br \/>\n* Bulk access version:<br \/>\n&#8211; BulkAdjudicationProvider<br \/>\n&#8211; BulkAdjudicator<\/p>\n<span id=\"Role_Mapping_Providers\"><h4>Role Mapping Providers<\/h4><\/span>\n<p>* 1 or more per realm (if more than one, then results are merged)<br \/>\n* Support dynamic role associations based on<br \/>\n&#8211; Security roles from J2EE and WL deployment descriptor files<br \/>\n&#8211; Business logic and the current operation parameters<br \/>\n* Provides role information to Authentication providers<br \/>\n* Bulk operations:<br \/>\n&#8211; BulkRoleProvider<br \/>\n&#8211; BulkRoleMapper<\/p>\n<span id=\"Audit_Providers\"><h4>Audit Providers<\/h4><\/span>\n<p>* 0 or more per realm<br \/>\n* Collects, stores, distributes information about operating requests and their outcomes<br \/>\n* For non-repudiation<br \/>\n* Can write audit info to<br \/>\n&#8211; LDAP<br \/>\n&#8211; DB<br \/>\n&#8211; File<\/p>\n<span id=\"Credential_Mapping_Providers\"><h4>Credential Mapping Providers<\/h4><\/span>\n<p>* 1 or more per realm (if more, results are combined)<br \/>\n* Maps WL credentials to legacy\/remote credentials<br \/>\n* Allow WL to login legacy\/remote systems on behalf of WL authenticated subjects<br \/>\n* Can handle different types of credentials<br \/>\n&#8211; username\/password<br \/>\n&#8211; SAML<br \/>\n&#8211; PKI certificates<\/p>\n<span id=\"Certificate_Lookup_and_Validation_Providers\"><h4>Certificate Lookup and Validation Providers<\/h4><\/span>\n<p>* 1 or more per realm (if more, need to pass all)<br \/>\n* Validate certificate chains<br \/>\n* Two CLS types:<br \/>\n&#8211; CertPath Builder: receives cert, cert chain, or cert ref from web service or application code, looks up and validates certificates in the chain<br \/>\n&#8211; CertPath Validator: receives cert chain from SSL protocol, web servicie, app code and perform <strong>extra <\/strong>validation such as revocation checking.<\/p>\n<span id=\"Keystore_Providers\"><h4>Keystore Providers<\/h4><\/span>\n<p>* Creates and manages password protected stores of private keys and trusted certs<br \/>\n* Deprecated, use <strong>JKS <\/strong>(Java Key Store) instead<\/p>\n<span id=\"Realm_Adapter_Providers\"><h4>Realm Adapter Providers<\/h4><\/span>\n<p>* Provides backward compatibility with WL 6.x realms<\/p>\n<span id=\"Migrate_provider_data_using_the_admin_console\"><h2>Migrate provider data using the admin console<\/h2><\/span>\n<p>* See <a href=\"http:\/\/docs.oracle.com\/cd\/E17904_01\/web.1111\/e13707\/security_data_migration.htm#i1188426\">Migrating Security Data<\/a><\/p>\n<span id=\"Overview_1\"><h3>Overview<\/h3><\/span>\n<p>* Can only migrate using the same format<br \/>\n&#8211; A format is a data format that specifies how security data should be exported or imported<br \/>\n* Constraints are key\/value pairs that specify import and export options. For example:<br \/>\n&#8211; passwords=cleartext<br \/>\n* Use <em>passwords=cleartext<\/em> to allow exporting password in clear text (does not work if passwords are one way hashed)<br \/>\n* Can use Admin Console or WLST<br \/>\n&#8211; WLST Example:<\/p>\n<pre lang=\"bash\">\r\ndomainRuntime() \r\ncd('DomainServices\/DomainRuntimeService\/DomainConfiguration\/mydomain\/SecurityConfiguration\/mydomain\/DefaultRealm\/myrealm\/path-to-MBean\/mbeanname')\r\ncmo.importData(format,filename,constraints) \r\n<\/pre>\n<span id=\"Export_data_from_security_realms\"><h3>Export data from security realms<\/h3><\/span>\n<p>* Export page:<\/p>\n<span id=\"_2\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_exp.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_exp-300x197.jpg\" alt=\"\" title=\"wlscert_sec_realm_exp\" width=\"300\" height=\"197\" class=\"aligncenter size-medium wp-image-5014\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_exp-300x197.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_exp.jpg 871w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Exported files:<\/p>\n<span id=\"_3\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_exported.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_exported.jpg\" alt=\"\" title=\"wlscert_sec_realm_exported\" width=\"223\" height=\"213\" class=\"aligncenter size-full wp-image-5017\" \/><\/a><\/h6><\/span>\n<span id=\"Import_data_into_security_realms\"><h3>Import data into security realms<\/h3><\/span>\n<p>* Import page:<\/p>\n<span id=\"_4\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_imp.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_imp-300x198.jpg\" alt=\"\" title=\"wlscert_sec_realm_imp\" width=\"300\" height=\"198\" class=\"aligncenter size-medium wp-image-5018\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_imp-300x198.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_imp.jpg 867w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Export_data_from_a_security_provider\"><h3>Export data from a security provider<\/h3><\/span>\n<p>* Export page:<\/p>\n<span id=\"_5\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_auth_provider_exp.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_auth_provider_exp-300x283.jpg\" alt=\"\" title=\"wlscert_sec_realm_auth_provider_exp\" width=\"300\" height=\"283\" class=\"aligncenter size-medium wp-image-5019\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_auth_provider_exp-300x283.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_auth_provider_exp.jpg 687w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Exported file:<\/p>\n<span id=\"_6\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_auth_provider_exp_file.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_auth_provider_exp_file.jpg\" alt=\"\" title=\"wlscert_sec_realm_auth_provider_exp_file\" width=\"270\" height=\"126\" class=\"aligncenter size-full wp-image-5020\" \/><\/a><\/h6><\/span>\n<span id=\"_7\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_auth_provider_exp_file_example.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_auth_provider_exp_file_example-300x241.jpg\" alt=\"\" title=\"wlscert_sec_realm_auth_provider_exp_file_example\" width=\"300\" height=\"241\" class=\"aligncenter size-medium wp-image-5021\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_auth_provider_exp_file_example-300x241.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_auth_provider_exp_file_example.jpg 561w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Import_data_from_a_security_provider\"><h3>Import data from a security provider<\/h3><\/span>\n<p>* Import page:<\/p>\n<span id=\"_8\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_auth_provider_imp.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_auth_provider_imp-300x257.jpg\" alt=\"\" title=\"wlscert_sec_realm_auth_provider_imp\" width=\"300\" height=\"257\" class=\"aligncenter size-medium wp-image-5022\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_auth_provider_imp-300x257.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_auth_provider_imp.jpg 684w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Create_users_and_groups_via_the_admin_console\"><h2>Create users and groups via the admin console<\/h2><\/span>\n<p>* See <a href=\"http:\/\/docs.oracle.com\/cd\/E17904_01\/apirefs.1111\/e13952\/taskhelp\/security\/ManageUsersAndGroups.html\">Manage users and groups<\/a><\/p>\n<span id=\"Create_User\"><h3>Create User<\/h3><\/span>\n<span id=\"_9\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_user1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_user1-270x300.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_user1\" width=\"270\" height=\"300\" class=\"aligncenter size-medium wp-image-5025\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_user1-270x300.jpg 270w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_user1.jpg 468w\" sizes=\"auto, (max-width: 270px) 100vw, 270px\" \/><\/a><\/h6><\/span>\n<span id=\"_10\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_user2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_user2-252x300.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_user2\" width=\"252\" height=\"300\" class=\"aligncenter size-medium wp-image-5026\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_user2-252x300.jpg 252w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_user2.jpg 442w\" sizes=\"auto, (max-width: 252px) 100vw, 252px\" \/><\/a><\/h6><\/span>\n<span id=\"_11\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_user3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_user3.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_user3\" width=\"133\" height=\"207\" class=\"aligncenter size-full wp-image-5027\" \/><\/a><\/h6><\/span>\n<span id=\"Create_Group\"><h3>Create Group<\/h3><\/span>\n<span id=\"_12\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_grp1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_grp1-188x300.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_grp1\" width=\"188\" height=\"300\" class=\"aligncenter size-medium wp-image-5028\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_grp1-188x300.jpg 188w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_grp1.jpg 212w\" sizes=\"auto, (max-width: 188px) 100vw, 188px\" \/><\/a><\/h6><\/span>\n<span id=\"_13\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_grp2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_grp2-260x300.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_grp2\" width=\"260\" height=\"300\" class=\"aligncenter size-medium wp-image-5029\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_grp2-260x300.jpg 260w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_grp2.jpg 357w\" sizes=\"auto, (max-width: 260px) 100vw, 260px\" \/><\/a><\/h6><\/span>\n<span id=\"_14\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_grp3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_grp3-184x300.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_grp3\" width=\"184\" height=\"300\" class=\"aligncenter size-medium wp-image-5030\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_grp3-184x300.jpg 184w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_grp3.jpg 209w\" sizes=\"auto, (max-width: 184px) 100vw, 184px\" \/><\/a><\/h6><\/span>\n<span id=\"Add_User_to_Group\"><h3>Add User to Group<\/h3><\/span>\n<span id=\"_15\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_user_to_grp.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_user_to_grp-297x300.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_user_to_grp\" width=\"297\" height=\"300\" class=\"aligncenter size-medium wp-image-5031\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_user_to_grp-297x300.jpg 297w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_user_to_grp.jpg 429w\" sizes=\"auto, (max-width: 297px) 100vw, 297px\" \/><\/a><\/h6><\/span>\n<span id=\"Configure_roles_and_policies_via_the_admin_console\"><h2>Configure roles and policies via the admin console<\/h2><\/span>\n<p>* See <a href=\"http:\/\/docs.oracle.com\/cd\/E17904_01\/apirefs.1111\/e13952\/taskhelp\/security\/ManageSecurityRoles.html\">Manage security roles<\/a><\/p>\n<span id=\"Role_Types\"><h3>Role Types<\/h3><\/span>\n<p>* Global roles<br \/>\n* Scoped roles: applies to a specific instance of a WebLogic resource (such as a method on an EJB or a branch of a JNDI tree)<\/p>\n<span id=\"Create_Global_Role\"><h3>Create Global Role<\/h3><\/span>\n<span id=\"_16\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role1-300x179.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_global_role1\" width=\"300\" height=\"179\" class=\"aligncenter size-medium wp-image-5032\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role1-300x179.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role1.jpg 996w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_17\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role2-259x300.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_global_role2\" width=\"259\" height=\"300\" class=\"aligncenter size-medium wp-image-5033\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role2-259x300.jpg 259w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role2.jpg 426w\" sizes=\"auto, (max-width: 259px) 100vw, 259px\" \/><\/a><\/h6><\/span>\n<span id=\"_18\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role3-300x245.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_global_role3\" width=\"300\" height=\"245\" class=\"aligncenter size-medium wp-image-5034\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role3-300x245.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role3.jpg 443w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_19\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role4.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role4-300x24.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_global_role4\" width=\"300\" height=\"24\" class=\"aligncenter size-medium wp-image-5035\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role4-300x24.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_global_role4.jpg 330w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Edit_Global_Roles\"><h3>Edit Global Roles<\/h3><\/span>\n<span id=\"_20\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role1-286x300.jpg\" alt=\"\" title=\"wlscert_sec_realm_edit_global_role1\" width=\"286\" height=\"300\" class=\"aligncenter size-medium wp-image-5036\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role1-286x300.jpg 286w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role1.jpg 681w\" sizes=\"auto, (max-width: 286px) 100vw, 286px\" \/><\/a><\/h6><\/span>\n<span id=\"_21\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role2-300x202.jpg\" alt=\"\" title=\"wlscert_sec_realm_edit_global_role2\" width=\"300\" height=\"202\" class=\"aligncenter size-medium wp-image-5037\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role2-300x202.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role2.jpg 528w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_22\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role3-300x145.jpg\" alt=\"\" title=\"wlscert_sec_realm_edit_global_role3\" width=\"300\" height=\"145\" class=\"aligncenter size-medium wp-image-5038\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role3-300x145.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role3.jpg 527w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_23\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role4.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role4-300x267.jpg\" alt=\"\" title=\"wlscert_sec_realm_edit_global_role4\" width=\"300\" height=\"267\" class=\"aligncenter size-medium wp-image-5039\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role4-300x267.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role4.jpg 522w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_24\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role5.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role5-300x252.jpg\" alt=\"\" title=\"wlscert_sec_realm_edit_global_role5\" width=\"300\" height=\"252\" class=\"aligncenter size-medium wp-image-5040\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role5-300x252.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role5.jpg 450w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_25\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role6.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role6-300x239.jpg\" alt=\"\" title=\"wlscert_sec_realm_edit_global_role6\" width=\"300\" height=\"239\" class=\"aligncenter size-medium wp-image-5041\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role6-300x239.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_edit_global_role6.jpg 524w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Remove_Global_Roles\"><h3>Remove Global Roles<\/h3><\/span>\n<p>* Global Roles can not be removed (?) but Conditions can be removed.<\/p>\n<span id=\"Create_Policies\"><h3>Create Policies<\/h3><\/span>\n<h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy1-300x248.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_policy1\" width=\"300\" height=\"248\" class=\"aligncenter size-medium wp-image-5043\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy1-300x248.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy1.jpg 748w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n<a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy2-300x200.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_policy2\" width=\"300\" height=\"200\" class=\"aligncenter size-medium wp-image-5044\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy2-300x200.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy2.jpg 746w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n<a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy3-300x126.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_policy3\" width=\"300\" height=\"126\" class=\"aligncenter size-medium wp-image-5045\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy3-300x126.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy3.jpg 747w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n<a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy4.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy4-300x168.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_policy4\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-5046\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy4-300x168.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy4.jpg 747w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n<a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy5.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy5-300x201.jpg\" alt=\"\" title=\"wlscert_sec_realm_add_policy5\" width=\"300\" height=\"201\" class=\"aligncenter size-medium wp-image-5047\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy5-300x201.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_add_policy5.jpg 749w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n<\/h6>\n<span id=\"Remove_Policies\"><h3>Remove Policies<\/h3><\/span>\n<span id=\"_26\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_remove_policy1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_remove_policy1-300x202.jpg\" alt=\"\" title=\"wlscert_sec_realm_remove_policy1\" width=\"300\" height=\"202\" class=\"aligncenter size-medium wp-image-5048\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_remove_policy1-300x202.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wlscert_sec_realm_remove_policy1.jpg 747w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Web_App_and_EJB_Sec_Models\"><h2><a href=\"http:\/\/docs.oracle.com\/cd\/E17904_01\/web.1111\/e13747\/secejbwar.htm#i1242796\">Web App and EJB Sec Models<\/a><\/h2><\/span>\n<span id=\"Deployment_Descriptor_DD_Only_Model\"><h3>Deployment Descriptor (DD) Only Model<\/h3><\/span>\n<p>* J2EE standard<br \/>\n* Uses only roles\/policies defined in both J2EE DDs and WebLogic DDs<br \/>\n* WLS security admins verify existence of principals in WLS sec realm<br \/>\n* Changes recognized by WLS when redeployed<\/p>\n<span id=\"Custom_Roles_Model\"><h3>Custom Roles Model<\/h3><\/span>\n<p>* Uses policies defined in J2EE DDs<br \/>\n* Ignores principal mappings in WLS DDs<br \/>\n* WLS sec admins use Admin Console to complete role mappings<\/p>\n<span id=\"Custom_Roles_and_Policies_Model\"><h3>Custom Roles and Policies Model<\/h3><\/span>\n<p>* Unified and dynamic sec management<br \/>\n* Uses roles and policies created by sec admins<br \/>\n* Ignores all roles\/policies defined in DDs<br \/>\n* Good for securing entire web apps or EJBs<br \/>\n* Not appropriate from fine grained control of large numbers of URL patterns and EJB methods<\/p>\n<span id=\"Advanced_Model\"><h3>Advanced Model<\/h3><\/span>\n<p>* Backward compatibility with WLS 9<\/p>\n<span id=\"Configure_roles_and_policies_using_application_descriptors\"><h2>Configure roles and policies using application descriptors<\/h2><\/span>\n<span id=\"Configure_Web_application_authentication_using_descriptors\"><h2>Configure Web application authentication using descriptors<\/h2><\/span>\n<p>* See <a href=\"http:\/\/docs.oracle.com\/cd\/E17904_01\/web.1111\/e13711\/thin_client.htm#SCPRG169\">Web Application Security-Related Deployment Descriptors<\/a><\/p>\n<span id=\"web.xml\"><h3>web.xml<\/h3><\/span>\n<p>* Example:<\/p>\n<pre lang=\"xml\">\r\n<security-constraint>\r\n    <web-resource-collection>\r\n        <web-resource-name>SecureOrdersEast<\/web-resource-name>\r\n        <description>\r\n            Security constraint for\r\n            resources in the orders\/east directory\r\n        <\/description>\r\n        <url-pattern>\/orders\/east\/*<\/url-pattern>\r\n        <http-method>POST<\/http-method>\r\n        <http-method>GET<\/http-method>\r\n    <\/web-resource-collection>\r\n    <auth-constraint>\r\n        <description>\r\n            constraint for east coast sales\r\n        <\/description>\r\n        <role-name>east<\/role-name>\r\n        <role-name>manager<\/role-name>\r\n        <\/auth-constraint>\r\n    <user-data-constraint>\r\n        <description>SSL not required<\/description>\r\n        <transport-guarantee>NONE<\/transport-guarantee>\r\n    <\/user-data-constraint>\r\n<\/security-constraint>\r\n<\/pre>\n<span id=\"security-constraint\"><h4>security-constraint<\/h4><\/span>\n<p>* web-resource-collection<br \/>\n&#8211; required<br \/>\n&#8211; defines components of the web app to which this security constraint is applied<br \/>\n*auth-constraint<br \/>\n&#8211; optional<br \/>\n&#8211; defines which groups or principals have access to the collection of Web resources defined in this security constraint.<br \/>\n* user-data-constraint<br \/>\n&#8211; optional<br \/>\n&#8211; defines how data communication between client and server should be protected (e.g. SSL)<\/p>\n<span id=\"security-role\"><h4>security-role<\/h4><\/span>\n<p>* Contains the definition of a security role<br \/>\n* Sample web.xml:<\/p>\n<pre lang=\"xml\">\r\n  <servlet>\r\n    <servlet-name>SnoopServlet<\/servlet-name>\r\n    <servlet-class>extra.SnoopServlet<\/servlet-class>\r\n    <run-as>\r\n      <role-name>runasrole<\/role-name>\r\n    <\/run-as>\r\n  <\/servlet>\r\n  <security-role>\r\n    <role-name>runasrole<\/role-name>\r\n  <\/security-role>\r\n<\/pre>\n<p>* Sample weblogic.xml:<\/p>\n<pre lang=\"xml\">\r\n  <weblogic-web-app>\r\n     <run-as-role-assignment>\r\n       <role-name>runasrole<\/role-name>\r\n       <run-as-principal-name>joe<\/run-as-principal-name>\r\n     <\/run-as-role-assignment>\r\n  <\/weblogic-web-app>\r\n<\/pre>\n<span id=\"security-role-ref\"><h4>security-role-ref<\/h4><\/span>\n<p>* Links a security role name defined by &lt;security-role&gt; to an alternative role name that is <strong>hard-coded<\/strong> in the servlet logic.<br \/>\n* This extra layer of abstraction allows the servlet to be configured at deployment without changing servlet code.<\/p>\n<pre lang=\"xml\">\r\nServlet code: \r\nout.println(\"Is the user a Manager? \" +\r\n                 request.isUserInRole(\"manager\"));\r\nweb.xml entries:\r\n<servlet>\r\n. . .\r\n   <role-name>manager<\/role-name>\r\n   <role-link>mgr<\/role-link>\r\n. . .\r\n<\/servlet>\r\n<security-role>\r\n   <role-name>mgr<\/role-name>\r\n<\/security-role>\r\nweblogic.xml entries:\r\n<security-role-assignment>\r\n   <role-name>mgr<\/role-name>\r\n   <principal-name>bostonManagers<\/principal-name>\r\n   <principal-name>Bill<\/principal-name>\r\n   <principal-name>Ralph<\/principal-name>\r\n<\/security-role-ref>\r\n<\/pre>\n<span id=\"weblogic.xml\"><h3>weblogic.xml<\/h3><\/span>\n<span id=\"externally-defined\"><h4>externally-defined<\/h4><\/span>\n<p>* Explicitly indicate that you want the security roles defined by the <em>role-name<\/em> element in the web.xml deployment descriptors to use the mappings specified in the Administration Console<br \/>\n* Exmaple (webuser has to be defined in WLS realm)<\/p>\n<pre lang=\"xml\">\r\nweb.xml entries:\r\n<web-app>\r\n           ...\r\n           <security-role>\r\n               <role-name>webuser<\/role-name>\r\n           <\/security-role>\r\n           ...\r\n<\/web-app>\r\nweblogic.xml entries:\r\n<weblogic-web-app>\r\n     <security-role-assignment>\r\n         <role-name>webuser<\/role-name>\r\n         <externally-defined\/>\r\n     <\/security-role-assignment>\r\n<\/pre>\n<span id=\"run-as-principal-name\"><h4>run-as-principal-name<\/h4><\/span>\n<p>* specifies the name of a principal to use for a security role defined by a <em>run-as<\/em> element in the companion web.xml file.<\/p>\n<pre lang=\"xml\">\r\nweb.xml:\r\n  <servlet>\r\n    <servlet-name>SnoopServlet<\/servlet-name>\r\n    <servlet-class>extra.SnoopServlet<\/servlet-class>\r\n    <run-as>\r\n      <role-name>runasrole<\/role-name>\r\n    <\/run-as>\r\n  <\/servlet>\r\n  <security-role>\r\n    <role-name>runasrole<\/role-name>\r\n  <\/security-role>\r\nweblogic.xml:\r\n  <weblogic-web-app>\r\n     <run-as-role-assignment>\r\n       <role-name>runasrole<\/role-name>\r\n       <run-as-principal-name>joe<\/run-as-principal-name>\r\n     <\/run-as-role-assignment>\r\n  <\/weblogic-web-app>\r\n<\/pre>\n<span id=\"security-permission\"><h4>security-permission<\/h4><\/span>\n<p>* Specifies a security permission that is associated with a Java EE Sandbox.<\/p>\n<pre lang=\"xml\">\r\n<weblogic-web-app>\r\n   <security-permission>\r\n     <description>Optional explanation goes here<\/description>\r\n     <security-permission-spec>\r\n<!--\r\nA single grant statement following the syntax of\r\nhttp:\/\/java.sun.com\/j2se\/1.5.0\/docs\/guide\/security\/PolicyFiles.html#FileSyntax,\r\nwithout the \"codebase\" and \"signedBy\" clauses, goes here. For example:\r\n-->\r\n      grant {\r\n      permission java.net.SocketPermission \"*\", \"resolve\";\r\n      };\r\n     <\/security-permission-spec>\r\n   <\/security-permission>\r\n<\/weblogic-web-app>\r\n<\/pre>\n<span id=\"security-role-assignment\"><h4>security-role-assignment<\/h4><\/span>\n<p>* declares a mapping between a security role and one or more principals in the WebLogic Server security realm.<br \/>\n* Example<\/p>\n<pre lang=\"xml\">\r\n<weblogic-web-app>\r\n  <security-role-assignment>\r\n        <role-name>PayrollAdmin<\/role-name>\r\n       <principal-name>Tanya<\/principal-name>\r\n       <principal-name>Fred<\/principal-name>\r\n       <principal-name>system<\/principal-name>\r\n  <\/security-role-assignment>\r\n<\/weblogic-web-app>\r\n<\/pre>\n<span id=\"Using_Programmatic_Security_With_Web_Applications\"><h3>Using Programmatic Security With Web Applications<\/h3><\/span>\n<p>* javax.servlet.http.HttpServletRequest.getUserPrincipal()<br \/>\n* javax.servlet.http.HttpServletRequest.isUserInRole(String role)<\/p>\n<span id=\"Using_the_Programmatic_Authentication_API\"><h3>Using the Programmatic Authentication API<\/h3><\/span>\n<p>* weblogic.servlet.security.ServletAuthentication<br \/>\n* weblogic.security.SimpleCallbackHandler<\/p>\n<pre lang=\"xml\">\r\nCallbackHandler handler = new SimpleCallbackHandler(username,\r\n                                                               password);\r\nSubject mySubject =\r\n        weblogic.security.services.Authentication.login(handler);\r\nweblogic.servlet.security.ServletAuthentication.runAs(mySubject, request);\r\n\/\/ Where request is the httpservletrequest object.\r\n<\/pre>\n<p>* weblogic.security.URLCallbackHandler<\/p>\n<pre lang=\"xml\">\r\nCallbackHandler handler = new URLCallbackHandler(username,\r\n                                                           password);\r\nSubject mySubject =\r\n        weblogic.security.services.Authentication.login(handler);\r\nweblogic.servlet.security.ServletAuthentication.runAs(mySubject, request);\r\n\/\/ Where request is the httpservletrequest object.\r\n<\/pre>\n<span id=\"Configure_the_embedded_LDAP_authentication_provider\"><h2>Configure the embedded LDAP authentication provider<\/h2><\/span>\n<p>* See <a href=\"http:\/\/docs.oracle.com\/cd\/E17904_01\/web.1111\/e13707\/atn.htm#i1216261\">Configuring LDAP Authentication Providers<\/a><\/p>\n<span id=\"DefaultAuthenticator\"><h3>DefaultAuthenticator<\/h3><\/span>\n<p>* Uses embedded LDAP server<br \/>\n* Supports any v2 or v3 compliant LDAP servers<br \/>\n* User names must be unique<\/p>\n<span id=\"Configuring_LDAP_Authentication_Providers\"><h3>Configuring LDAP Authentication Providers<\/h3><\/span>\n<p><a href=\"?p=5414\">Next<\/a> >><\/p>\n<p>[mv_include id=&#8217;3268&#8242;]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>grant { permission java.net.SocketPermission &#8220;*&#8221;, &#8220;resolve&#8221;; }; > [mv_include id=&#8217;3268&#8242;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[107,104],"tags":[588,576,590],"class_list":["post-5001","post","type-post","status-publish","format-standard","hentry","category-certification","category-weblogic11g","tag-11g","tag-security","tag-weblogic"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-1iF","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/5001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5001"}],"version-history":[{"count":21,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/5001\/revisions"}],"predecessor-version":[{"id":5711,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/5001\/revisions\/5711"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}