Skip to content

Commit 8b28bff

Browse files
Fix unhandled exception when REALM not present (#743)
* Fix unhandled exception when REALM not present * Update use_cases.md
1 parent 917b990 commit 8b28bff

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ def _slim_security_config(self, sc_dict):
358358
realm_dict = dictionary_utils.get_dictionary_element(sc_dict, model_constants.REALM)
359359
if 'myrealm' in realm_dict and dictionary_utils.is_empty_dictionary_element(realm_dict, 'myrealm'):
360360
del sc_dict[model_constants.REALM]['myrealm']
361-
if dictionary_utils.is_empty_dictionary_element(sc_dict, model_constants.REALM):
361+
if model_constants.REALM in sc_dict and \
362+
dictionary_utils.is_empty_dictionary_element(sc_dict, model_constants.REALM):
362363
del sc_dict[model_constants.REALM]
363364
return sc_dict
364365

site/use_cases.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,9 @@
337337

338338
**NOTE:** Creating and updating domains with custom security providers is limited to WebLogic version 12.1.2 and newer.
339339

340-
Prior to using this tooling to create or update a domain with a custom security provider, there are several prerequisites. First, WebLogic Server requires the custom MBean JAR to be in the Oracle Home directory before it can be configured, `WLSERVER/server/lib/mbeantypes`. Second, WebLogic Scripting Tool, WLST, requires that the schema JAR be placed in the Oracle Home directory before WLST offline can be used to configure it, `ORACLEHOME/oracle_common/lib/schematypes`. Generating an MBean JAR documentation can be found in the WebLogic Server [documentation](https://docs.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/devsp/generate_mbeantype.html). Generating the schema JAR can be done with the `prepareCustomProvider` script provided in the WebLogic Server installation.
340+
Prior to using this tooling to create or update a domain with a custom security provider, there are several prerequisites. First, WebLogic Server requires the custom MBean JAR to be in the Oracle Home directory before it can be configured, `WLSERVER/server/lib/mbeantypes`. Second, WebLogic Scripting Tool, WLST, requires that the schema JAR be placed in the Oracle Home directory before WLST offline can be used to discover it or configure it, `ORACLEHOME/oracle_common/lib/schematypes`. Generating an MBean JAR documentation can be found in the WebLogic Server [documentation](https://docs.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/devsp/generate_mbeantype.html). Generating the schema JAR can be done with the `prepareCustomProvider` script provided in the WebLogic Server installation.
341+
342+
WebLogic allows you to define an alternate directory other than `WLSERVER/server/lib/mbeantypes` by using the system property `-Dweblogic.alternateTypesDirectory=dir`. In order for the custom provider jars to be loaded correctly by WLST when discovering or configuring a domain, set this system property in the `WLSDEPLOY_PROPERTIES` environment variable.
341343

342344
The format for a custom security provider is slightly different from a built-in provider in that the custom provider must supply the fully-qualified name of the class for the provider in the model between the provider name and the attributes for that provider. Note that the generated Impl suffix is omitted from the name. In the custom `CredentialMapper` example below, note the location in the model of 'examples.security.providers.SampleCredentialMapper':
343345

0 commit comments

Comments
 (0)