SlideShare a Scribd company logo
Change Password for Weblogic users in OBIEE 11g

PREPARED BY RAVI KUMAR LANKE

Page 1
JDeveloper Steps
I used JDeveloper to build and deploy the webservice,

Open JDeveloper

PREPARED BY RAVI KUMAR LANKE

Page 2
PREPARED BY RAVI KUMAR LANKE

Page 3
PREPARED BY RAVI KUMAR LANKE

Page 4
PREPARED BY RAVI KUMAR LANKE

Page 5
Paste in the contents of ChngPwd.java to your new class file in JDeveloper.
o
Changepwd.java
Note: You will need to update the variables for weblogic hostname, port, username, and password.

package ChngPwd;
import java.io.IOException;
import java.net.MalformedURLException;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
import java.util.HashMap;
import java.util.Hashtable;
import javax.naming.Context;

PREPARED BY RAVI KUMAR LANKE

Page 6
@WebService
public class ChngPwd
{
private static JMXConnector jmxConnector = null;
private static MBeanServerConnection mBeanServerConnection = null;
private static String webLogicHostname = "172.16.12.166"; // Set to the weblogic host
private static String webLogicPort = "9704"; // Set to the port of the admin server on the weblogic
instance
// private static String webLogicUsername = "weblogic"; // Set to the weblogic admin user
//private static String webLogicPassword = "welcome123"; // Set to the password of the weblogic
admin user
private static final String validationFailed = "[Security:090237]";
private static final String mustBeEightChars = "[Security:090285]";
private static final String missingSpecialChars = "[Security:099116]";
public ChngPwd() {} // for JAXB
@WebMethod(exclude = true)
public String changeUserPassword( String userId, String oldPassword, String newPassword, String
confirmPassword ) throws Exception
{
ObjectName securityMBeanName = new
ObjectName("Security:Name=myrealmDefaultAuthenticator");
Object objUser[] = new Object[]{(userId), (oldPassword), (newPassword) };
String objStr[] = new String[]{("java.lang.String"), ("java.lang.String"), ("java.lang.String") };
try
{
if ( confirmPassword.equals(newPassword) )
{
mBeanServerConnection.invoke(securityMBeanName, "changeUserPassword", objUser,
objStr);
return "Password successfully changed.";
}
else
{
return "New passwords do not match.";
}
}
catch (Exception e)
{
if( e.getCause().getMessage().contains( validationFailed ) )
return "Validation of old password failed.";
else if ( e.getCause().getMessage().contains( mustBeEightChars ) )
PREPARED BY RAVI KUMAR LANKE

Page 7
return "Password must be at least 8 characters long.";
else if ( e.getCause().getMessage().contains( missingSpecialChars ) )
return "Password must contain at least 1 number or special character.";
else
return "Can not reset password at this time. Please contact an Administrator.";
}
}
@WebMethod(exclude = true)
public static void initConnection(String hostname, String portString,String webLogicUsername,String
webLogicPassword) throws IOException, MalformedURLException
{
Integer portInteger = Integer.valueOf(portString);
int port = portInteger.intValue();
String mserver = "/weblogic.management.mbeanservers.runtime";
JMXServiceURL serviceURL = new JMXServiceURL("service:jmx:iiop:///jndi/iiop://" + hostname + ":"
+ port + mserver);
Hashtable h = new Hashtable();
String[] credentials = new String[] {webLogicUsername, webLogicPassword };
h.put("jmx.remote.credentials", credentials);
jmxConnector = JMXConnectorFactory.connect(serviceURL, h);
//jmxConnector = JMXConnectorFactory.connect(serviceURL);
mBeanServerConnection = jmxConnector.getMBeanServerConnection();
}
/*@WebMethod(exclude = true)
public static void main(String[] args) throws Exception
{
}*/
public String passwordchange( String userId, String oldPassword, String newPassword, String
confirmPassword ) throws Exception
{
ChngPwd c = new ChngPwd();
initConnection(webLogicHostname, webLogicPort,userId,oldPassword);
String result = c.changeUserPassword( userId, oldPassword, newPassword, confirmPassword );
jmxConnector.close();
return result;
}
}
PREPARED BY RAVI KUMAR LANKE

Page 8
PREPARED BY RAVI KUMAR LANKE

Page 9
PREPARED BY RAVI KUMAR LANKE

Page 10
Let’s now deploy the web service to the Weblogic server. Right Click on the project and clickDeploy –>
Webservices

PREPARED BY RAVI KUMAR LANKE

Page 11
PREPARED BY RAVI KUMAR LANKE

Page 12
PREPARED BY RAVI KUMAR LANKE

Page 13
PREPARED BY RAVI KUMAR LANKE

Page 14
PREPARED BY RAVI KUMAR LANKE

Page 15
PREPARED BY RAVI KUMAR LANKE

Page 16
PREPARED BY RAVI KUMAR LANKE

Page 17
OBIEE 11g Steps
The following steps take place from within OBIEE. They will create a simple Agent to invoke the
webservice deployed above, and then create a hidden dashboard page to be a launch point for the agent.

Login to the OBIEE portal (http://localhost:9704/analytics)

PREPARED BY RAVI KUMAR LANKE

Page 18
PREPARED BY RAVI KUMAR LANKE

Page 19


Create a new Dashboard,called DemoSettings.



Under Location, select Browser…



From the Shared Folders folder, select New Folder. Name it DemoAccount.

Select the radio button for Add content later (Create empty dashboard). Click Ok.

PREPARED BY RAVI KUMAR LANKE

Page 20
PREPARED BY RAVI KUMAR LANKE

Page 21


Click on the Catalog link, and navigate to the newly created folder, DemoAccount.


Select Permissions to set the appropriate permissions on the new folder, BI Administrator should
have Full Control. BI Consumer should have Open.
Make sure that Apply permissions to sub-folders and Apply permissions to items within folder are
both selected.


Click Ok.

PREPARED BY RAVI KUMAR LANKE

Page 22
From the New menu in the OBIEE global navigation, select Action

PREPARED BY RAVI KUMAR LANKE

Page 23
Choose Invoke Web Service from the popup menu.

PREPARED BY RAVI KUMAR LANKE

Page 24
Plug in the WSDL and click Open.
The URL would look like: http://<weblogic host>:<obiee port>/<package name>-<project name>-contextroot/<package name>Port?WSDL

On my local, it is: http://172.16.12.166:9704/ChngPwd-passwordchange-contextroot/ChngPwdPort?WSDL

Drill down until you can select passwordChange, and select it. Click Ok

PREPARED BY RAVI KUMAR LANKE

Page 25
This opens up a new dialog box, enter the following values for the prompts (no quotes):
o
passwordChange_arg0 = "Username:"
o
passwordChange_arg1 = "Old Password:"
o
passwordChange_arg2 = "New Password:"
o
passwordChange_arg3 = "Confirm Password:"

For the Username argument, for Value select Session Variable, then type in USER and mark it
as fixed and hidden.
This will force the password change to only work for the current logged in user.

PREPARED BY RAVI KUMAR LANKE

Page 26
Click the Options button to personalize the messages (again, no quotes):
Set Dialog Title to "Change Password"
Set Action Help Text to "Please enter your existing password and new password below."
Set Execute Button Text to "Change Password"
Leave all other options blank.

PREPARED BY RAVI KUMAR LANKE

Page 27
Click on the Action Results tab and enter the parameters for the return messages (again, no quotes):
Set Dialog Text to "@{passwordChangeResponse}"
Create one XPath variable:
Name: passwordChangeResponse
XPath Expression: Body/passwordChangeResponse/return
Set Dialog Title to "Result"

PREPARED BY RAVI KUMAR LANKE

Page 28
Click Ok. Click Save Action.
Save the action as ChangePassword into the DemoAccount Shared Folder you created above.

PREPARED BY RAVI KUMAR LANKE

Page 29
Navigate to your newly created Dashboard, DemoSettings. Edit the dashboard by placing a new section.
In that section, add a text item. Place the following into the text item (making sure to check the Contains
HTML Markup box):

PREPARED BY RAVI KUMAR LANKE

Page 30
<script type="text/javascript">
document.getElementById("idPageOptions").style.display = "none";
</script>
Welcome to the change password page. This page will allow you to change your
password for access to the Business Intelligence reporting
application.<br><br>
You are currently logged in as
<b>@{biServer.variables['NQ_SESSION.USER']}</b>.<br><br>
Please click the link below to begin the password reset process.

PREPARED BY RAVI KUMAR LANKE

Page 31
PREPARED BY RAVI KUMAR LANKE

Page 32
PREPARED BY RAVI KUMAR LANKE

Page 33
Click Ok. Edit the Column Properties. Click on Custom CSS Style Options (HTML Only) and add the
following to the Use Custom CSS Style:
position:absolute;height:120px; margin-top:40px;

Drag an Action Link below your text item in that same section. Name the link Change Password, and
navigate to the saved Action Link you saved to the Shared Folder. Don’t define any values, just click on
the Ok button.
Click Ok to close the Action Link Properties window.

PREPARED BY RAVI KUMAR LANKE

Page 34
On the main section properties, unselect Collapsible. Additionally, from the Section Properties, set the
border position to None.

PREPARED BY RAVI KUMAR LANKE

Page 35
PREPARED BY RAVI KUMAR LANKE

Page 36
PREPARED BY RAVI KUMAR LANKE

Page 37
Click the

icon to save the dashboard. Click the

PREPARED BY RAVI KUMAR LANKE

icon to view the results.

Page 38
PREPARED BY RAVI KUMAR LANKE

Page 39
OBIEE Server Steps

The following steps take place on the OBIEE server. All files references are
for a Linux/Solaris install, but file locations will be similar for Windows.
Update the following files, to place a link to the Change Password in the header bar:
/apps/applobi/OBIEE11g/Oracle_BI1/bifoundation/web/app/res/b_mozilla/header.js
/apps/applobi/OBIEE11g/user_projects/domains/bifoundation_domain/servers/bi_server1/tmp/_WL_user/
analytics_11.1.1/7dezjl/war/res/b_mozilla/header.js

PREPARED BY RAVI KUMAR LANKE

Page 40
For these two files, find the line:

b.push(new
obips.ContextMenu.MenuOption(saw.header.getLocalizedString("kmsgHeaderMyAccou
nt"),"",null,new obips.Callback(this,this.onMyAccount)));

and replace it with:

b.push(new
obips.ContextMenu.MenuOption(saw.header.getLocalizedString("kmsgHeaderMyAccou
nt"),"",null,new obips.Callback(this,this.onMyAccount)));b.push(new
obips.ContextMenu.MenuOption(saw.header.getLocalizedString("kmsgHeaderCustomU
RL"),"",null,new obips.Callback(this,this.onCustomURL)));



then find the line:

saw.header.NavBar.prototype.onMyAccount=function(){saw.header.Menubar.getMana
ger().hidePopupPanel();var a=new
saw.ondemandload.FuncProxy("obips.AccountInfo.launchDialog",{messageTemplate:
"kuiMyAccountDialogHead"});a.exec()};



and replace it with:

saw.header.NavBar.prototype.onMyAccount=function(){saw.header.Menubar.getMana
ger().hidePopupPanel();var a=new
saw.ondemandload.FuncProxy("obips.AccountInfo.launchDialog",
{messageTemplate:"kuiMyAccountDialogHead"});a.exec()};saw.header.NavBar.proto
type.onCustomURL=function(){var w = 1920, h = 1080; if (document.all) { w =
document.body.clientWidth;h = document.body.clientHeight;x =
window.screenTop;y = window.screenLeft;} else if (document.layers) { w =
window.innerWidth;h = window.innerHeight;x = window.screenX;y =
window.screenY;} var popW = 450, popH = 276;var leftPos = ((w-popW)/2)+y,
topPos = ((h-popH)/2)+x;window.open('saw.dll?PortalPages&PortalPath
%2Fshared%2FUser%20Account%2F_portal%2FUser%20Settings','passwordresetwindow'
,'toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no,

PREPARED BY RAVI KUMAR LANKE

Page 41
directories=no, status=no,
width='+popW+',height='+popH+',top='+topPos+',left='+leftPos);};

Note: Replace the bold part with the path to the location you saved the Action Link in OBIEE above.

PREPARED BY RAVI KUMAR LANKE

Page 42
PREPARED BY RAVI KUMAR LANKE

Page 43
Update the following file to add the resource id
/apps/applobi/OBIEE11g/Oracle_BI1/bifoundation/web/msgdb/common/saw.header.xml
For this file, add the following line:
<resource id="kmsgHeaderCustomURL" />

PREPARED BY RAVI KUMAR LANKE

Page 44
Save it and exit
The next file will not exist out of the box, and needs to be created, along with any folders along the way.
/apps/applobi/OBIEE11g/instances/instance1/bifoundation/OracleBIPresentationServicesComponent/core
application_obips1/msgdb/l_en/customMessages/uicmsgs/saw.header.xml
For this file, you will be creating it, so make the contents:

<?xml version="1.0" encoding="utf-8"?>

PREPARED BY RAVI KUMAR LANKE

Page 45
<webmessagetables xmlns:sawm="com.siebel.analytics.web/message/v1">
<webmessagetable lang="en-us" system="saw.header" table="Messages">
<webmessage name="kmsgHeaderCustomURL"><text>Change
Password</text></webmessage>
</webmessagetable>
</webmessagetables>

PREPARED BY RAVI KUMAR LANKE

Page 46
Save it and exit

Restart the OBIEE services. You should now see a link under the User menu called Change Password.
This will open a new window providing the user with simple instructions to change their password.

PREPARED BY RAVI KUMAR LANKE

Page 47
PREPARED BY RAVI KUMAR LANKE

Page 48
PREPARED BY RAVI KUMAR LANKE

Page 49
PREPARED BY RAVI KUMAR LANKE

Page 50
PREPARED BY RAVI KUMAR LANKE

Page 51
PREPARED BY RAVI KUMAR LANKE

Page 52
PREPARED BY RAVI KUMAR LANKE

Page 53
PREPARED BY RAVI KUMAR LANKE

Page 54
PREPARED BY RAVI KUMAR LANKE

Page 55
PREPARED BY RAVI KUMAR LANKE

Page 56
PREPARED BY RAVI KUMAR LANKE

Page 57
PREPARED BY RAVI KUMAR LANKE

Page 58
PREPARED BY RAVI KUMAR LANKE

Page 59
PREPARED BY RAVI KUMAR LANKE

Page 60
PREPARED BY RAVI KUMAR LANKE

Page 61
PREPARED BY RAVI KUMAR LANKE

Page 62
PREPARED BY RAVI KUMAR LANKE

Page 63
PREPARED BY RAVI KUMAR LANKE

Page 64

More Related Content

PDF
What is ISO 27001 ISMS
PPT
Auditing.ppt
PPTX
AWS Lambdaと AWS API Gatewayを使ったREST API作り
PPTX
Introduction to COBIT 5 and IT management
PPTX
Presentation on iso 27001-2013, Internal Auditing and BCM
PPTX
Iso iec 27001 foundation training course by interprom
PDF
Predictive Analytics Using R | Edureka
PDF
DoD Cloud Computing Strategy
What is ISO 27001 ISMS
Auditing.ppt
AWS Lambdaと AWS API Gatewayを使ったREST API作り
Introduction to COBIT 5 and IT management
Presentation on iso 27001-2013, Internal Auditing and BCM
Iso iec 27001 foundation training course by interprom
Predictive Analytics Using R | Edureka
DoD Cloud Computing Strategy

Viewers also liked (20)

PDF
Install windows server 2003
PPT
Zelfstandig ondernemen in franchiseformule
PDF
Feature satip4
PDF
Veliki povratek Myspacea_Marketing Magazin_nov2012_st.378_str.18
PPTX
IL in a Webh2.0 World
PPTX
Neoea summer academy 2013
PPTX
11 different types of blog posts - to avoid boring your readers!
PDF
Windows xp installation
PPTX
Advanced Excel, Day 2
PPT
Plenaire deel seminar Toekomst kleine corporaties 27 januari 2011
PPTX
The Princeton Review, MCAT 2015 Dashboard - MITX Award Entry
PDF
2008ko Txostena
PDF
PPT
Keylingo Translations Summary
PPS
游戏运营(第一讲)
PPT
Интернет для индустрии красоты
PPT
Inleiding CV-ketelkeuring: "Last of Must"
PDF
ekonomista 2.0 - N.º 8 (eusk)
Install windows server 2003
Zelfstandig ondernemen in franchiseformule
Feature satip4
Veliki povratek Myspacea_Marketing Magazin_nov2012_st.378_str.18
IL in a Webh2.0 World
Neoea summer academy 2013
11 different types of blog posts - to avoid boring your readers!
Windows xp installation
Advanced Excel, Day 2
Plenaire deel seminar Toekomst kleine corporaties 27 januari 2011
The Princeton Review, MCAT 2015 Dashboard - MITX Award Entry
2008ko Txostena
Keylingo Translations Summary
游戏运营(第一讲)
Интернет для индустрии красоты
Inleiding CV-ketelkeuring: "Last of Must"
ekonomista 2.0 - N.º 8 (eusk)
Ad

Similar to Change password for weblogic users in obiee 11g (15)

PDF
How to reset the lost weblogic admin user passwd
PDF
Obiee 11g security creating users groups and catalog permissions
PDF
Database users authentication obiee 11 g
PDF
Christoph Stoettner - Save my time using scripts
PDF
Passwords Safe
PPTX
OWASP_Top_Ten_Proactive_Controls_v2.pptx
PDF
How to reset forgotten obiee 11 g rpd passwd
PDF
Installing the oracle bi mobile app designer
PPTX
Passwords
PDF
No, wait, not that way! - Real-world lessons from an OBIA 11g implementation
PDF
OBIEE 11g: Configuring LDAP Server
DOCX
TechSupportCh 21 project.doc1Projects.doc Project 21-.docx
PPTX
Programming in php
DOC
Creating a Simple PHP and MySQL-Based Login System
PPTX
PHP FUNCTIONS
How to reset the lost weblogic admin user passwd
Obiee 11g security creating users groups and catalog permissions
Database users authentication obiee 11 g
Christoph Stoettner - Save my time using scripts
Passwords Safe
OWASP_Top_Ten_Proactive_Controls_v2.pptx
How to reset forgotten obiee 11 g rpd passwd
Installing the oracle bi mobile app designer
Passwords
No, wait, not that way! - Real-world lessons from an OBIA 11g implementation
OBIEE 11g: Configuring LDAP Server
TechSupportCh 21 project.doc1Projects.doc Project 21-.docx
Programming in php
Creating a Simple PHP and MySQL-Based Login System
PHP FUNCTIONS
Ad

More from Ravi Kumar Lanke (20)

PPTX
mariadb_odbc_step_by_step_implementation.pptx
PPTX
Local users and groups missing in windows 10.pptx
PPT
Steps for Multimedia Signal Processesing.ppt
PPT
An overview of concepts of Sentiment Analysis
PPT
Step by Step Oracle Virtual Manager Installation.ppt
PPTX
CA workload Automation Tool Power Point Presentation
PDF
Creating and configuring vnc sessions
PDF
Copying files between linux machines using scp and ssh without linux user pas...
PDF
Exporting schema to dmp file and importing it into other oracle database
PDF
Installing Endeca Server, Studio, Integrator ETL , Commerce and Platform Serv...
PDF
Installing solaris on virtual box and installing weblogic server
PDF
Enabling remote desktop connection on windows 7 64 bit
PDF
Connecting to the remote database through sql developer without database clie...
PDF
Setting home path class path and path for java on windows 7
PDF
How to find ip and mac address
PDF
Step by step deployment of sampleappv406
PDF
Installing and configuring informatica 910 and dac 11 g on windows 64 bit
PDF
Installing bi applications 7.9.6.4 on obiee 11.1.1.7.0
PDF
Installing my sql on windows
PDF
How to prevent access to command prompt and registry editing tools and window...
mariadb_odbc_step_by_step_implementation.pptx
Local users and groups missing in windows 10.pptx
Steps for Multimedia Signal Processesing.ppt
An overview of concepts of Sentiment Analysis
Step by Step Oracle Virtual Manager Installation.ppt
CA workload Automation Tool Power Point Presentation
Creating and configuring vnc sessions
Copying files between linux machines using scp and ssh without linux user pas...
Exporting schema to dmp file and importing it into other oracle database
Installing Endeca Server, Studio, Integrator ETL , Commerce and Platform Serv...
Installing solaris on virtual box and installing weblogic server
Enabling remote desktop connection on windows 7 64 bit
Connecting to the remote database through sql developer without database clie...
Setting home path class path and path for java on windows 7
How to find ip and mac address
Step by step deployment of sampleappv406
Installing and configuring informatica 910 and dac 11 g on windows 64 bit
Installing bi applications 7.9.6.4 on obiee 11.1.1.7.0
Installing my sql on windows
How to prevent access to command prompt and registry editing tools and window...

Recently uploaded (20)

PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PPTX
Lesson notes of climatology university.
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
Yogi Goddess Pres Conference Studio Updates
PDF
Trump Administration's workforce development strategy
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Updated Idioms and Phrasal Verbs in English subject
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
Classroom Observation Tools for Teachers
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Orientation - ARALprogram of Deped to the Parents.pptx
Lesson notes of climatology university.
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
Yogi Goddess Pres Conference Studio Updates
Trump Administration's workforce development strategy
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Supply Chain Operations Speaking Notes -ICLT Program
Final Presentation General Medicine 03-08-2024.pptx
Anesthesia in Laparoscopic Surgery in India
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Microbial diseases, their pathogenesis and prophylaxis
Updated Idioms and Phrasal Verbs in English subject
2.FourierTransform-ShortQuestionswithAnswers.pdf
Computing-Curriculum for Schools in Ghana
Classroom Observation Tools for Teachers
LDMMIA Reiki Yoga Finals Review Spring Summer
202450812 BayCHI UCSC-SV 20250812 v17.pptx
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE

Change password for weblogic users in obiee 11g

  • 1. Change Password for Weblogic users in OBIEE 11g PREPARED BY RAVI KUMAR LANKE Page 1
  • 2. JDeveloper Steps I used JDeveloper to build and deploy the webservice, Open JDeveloper PREPARED BY RAVI KUMAR LANKE Page 2
  • 3. PREPARED BY RAVI KUMAR LANKE Page 3
  • 4. PREPARED BY RAVI KUMAR LANKE Page 4
  • 5. PREPARED BY RAVI KUMAR LANKE Page 5
  • 6. Paste in the contents of ChngPwd.java to your new class file in JDeveloper. o Changepwd.java Note: You will need to update the variables for weblogic hostname, port, username, and password. package ChngPwd; import java.io.IOException; import java.net.MalformedURLException; import javax.jws.WebMethod; import javax.jws.WebService; import javax.management.MBeanServerConnection; import javax.management.ObjectName; import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; import java.util.HashMap; import java.util.Hashtable; import javax.naming.Context; PREPARED BY RAVI KUMAR LANKE Page 6
  • 7. @WebService public class ChngPwd { private static JMXConnector jmxConnector = null; private static MBeanServerConnection mBeanServerConnection = null; private static String webLogicHostname = "172.16.12.166"; // Set to the weblogic host private static String webLogicPort = "9704"; // Set to the port of the admin server on the weblogic instance // private static String webLogicUsername = "weblogic"; // Set to the weblogic admin user //private static String webLogicPassword = "welcome123"; // Set to the password of the weblogic admin user private static final String validationFailed = "[Security:090237]"; private static final String mustBeEightChars = "[Security:090285]"; private static final String missingSpecialChars = "[Security:099116]"; public ChngPwd() {} // for JAXB @WebMethod(exclude = true) public String changeUserPassword( String userId, String oldPassword, String newPassword, String confirmPassword ) throws Exception { ObjectName securityMBeanName = new ObjectName("Security:Name=myrealmDefaultAuthenticator"); Object objUser[] = new Object[]{(userId), (oldPassword), (newPassword) }; String objStr[] = new String[]{("java.lang.String"), ("java.lang.String"), ("java.lang.String") }; try { if ( confirmPassword.equals(newPassword) ) { mBeanServerConnection.invoke(securityMBeanName, "changeUserPassword", objUser, objStr); return "Password successfully changed."; } else { return "New passwords do not match."; } } catch (Exception e) { if( e.getCause().getMessage().contains( validationFailed ) ) return "Validation of old password failed."; else if ( e.getCause().getMessage().contains( mustBeEightChars ) ) PREPARED BY RAVI KUMAR LANKE Page 7
  • 8. return "Password must be at least 8 characters long."; else if ( e.getCause().getMessage().contains( missingSpecialChars ) ) return "Password must contain at least 1 number or special character."; else return "Can not reset password at this time. Please contact an Administrator."; } } @WebMethod(exclude = true) public static void initConnection(String hostname, String portString,String webLogicUsername,String webLogicPassword) throws IOException, MalformedURLException { Integer portInteger = Integer.valueOf(portString); int port = portInteger.intValue(); String mserver = "/weblogic.management.mbeanservers.runtime"; JMXServiceURL serviceURL = new JMXServiceURL("service:jmx:iiop:///jndi/iiop://" + hostname + ":" + port + mserver); Hashtable h = new Hashtable(); String[] credentials = new String[] {webLogicUsername, webLogicPassword }; h.put("jmx.remote.credentials", credentials); jmxConnector = JMXConnectorFactory.connect(serviceURL, h); //jmxConnector = JMXConnectorFactory.connect(serviceURL); mBeanServerConnection = jmxConnector.getMBeanServerConnection(); } /*@WebMethod(exclude = true) public static void main(String[] args) throws Exception { }*/ public String passwordchange( String userId, String oldPassword, String newPassword, String confirmPassword ) throws Exception { ChngPwd c = new ChngPwd(); initConnection(webLogicHostname, webLogicPort,userId,oldPassword); String result = c.changeUserPassword( userId, oldPassword, newPassword, confirmPassword ); jmxConnector.close(); return result; } } PREPARED BY RAVI KUMAR LANKE Page 8
  • 9. PREPARED BY RAVI KUMAR LANKE Page 9
  • 10. PREPARED BY RAVI KUMAR LANKE Page 10
  • 11. Let’s now deploy the web service to the Weblogic server. Right Click on the project and clickDeploy –> Webservices PREPARED BY RAVI KUMAR LANKE Page 11
  • 12. PREPARED BY RAVI KUMAR LANKE Page 12
  • 13. PREPARED BY RAVI KUMAR LANKE Page 13
  • 14. PREPARED BY RAVI KUMAR LANKE Page 14
  • 15. PREPARED BY RAVI KUMAR LANKE Page 15
  • 16. PREPARED BY RAVI KUMAR LANKE Page 16
  • 17. PREPARED BY RAVI KUMAR LANKE Page 17
  • 18. OBIEE 11g Steps The following steps take place from within OBIEE. They will create a simple Agent to invoke the webservice deployed above, and then create a hidden dashboard page to be a launch point for the agent. Login to the OBIEE portal (http://localhost:9704/analytics) PREPARED BY RAVI KUMAR LANKE Page 18
  • 19. PREPARED BY RAVI KUMAR LANKE Page 19
  • 20.  Create a new Dashboard,called DemoSettings.  Under Location, select Browser…  From the Shared Folders folder, select New Folder. Name it DemoAccount. Select the radio button for Add content later (Create empty dashboard). Click Ok. PREPARED BY RAVI KUMAR LANKE Page 20
  • 21. PREPARED BY RAVI KUMAR LANKE Page 21
  • 22.  Click on the Catalog link, and navigate to the newly created folder, DemoAccount.  Select Permissions to set the appropriate permissions on the new folder, BI Administrator should have Full Control. BI Consumer should have Open. Make sure that Apply permissions to sub-folders and Apply permissions to items within folder are both selected.  Click Ok. PREPARED BY RAVI KUMAR LANKE Page 22
  • 23. From the New menu in the OBIEE global navigation, select Action PREPARED BY RAVI KUMAR LANKE Page 23
  • 24. Choose Invoke Web Service from the popup menu. PREPARED BY RAVI KUMAR LANKE Page 24
  • 25. Plug in the WSDL and click Open. The URL would look like: http://<weblogic host>:<obiee port>/<package name>-<project name>-contextroot/<package name>Port?WSDL On my local, it is: http://172.16.12.166:9704/ChngPwd-passwordchange-contextroot/ChngPwdPort?WSDL Drill down until you can select passwordChange, and select it. Click Ok PREPARED BY RAVI KUMAR LANKE Page 25
  • 26. This opens up a new dialog box, enter the following values for the prompts (no quotes): o passwordChange_arg0 = "Username:" o passwordChange_arg1 = "Old Password:" o passwordChange_arg2 = "New Password:" o passwordChange_arg3 = "Confirm Password:" For the Username argument, for Value select Session Variable, then type in USER and mark it as fixed and hidden. This will force the password change to only work for the current logged in user. PREPARED BY RAVI KUMAR LANKE Page 26
  • 27. Click the Options button to personalize the messages (again, no quotes): Set Dialog Title to "Change Password" Set Action Help Text to "Please enter your existing password and new password below." Set Execute Button Text to "Change Password" Leave all other options blank. PREPARED BY RAVI KUMAR LANKE Page 27
  • 28. Click on the Action Results tab and enter the parameters for the return messages (again, no quotes): Set Dialog Text to "@{passwordChangeResponse}" Create one XPath variable: Name: passwordChangeResponse XPath Expression: Body/passwordChangeResponse/return Set Dialog Title to "Result" PREPARED BY RAVI KUMAR LANKE Page 28
  • 29. Click Ok. Click Save Action. Save the action as ChangePassword into the DemoAccount Shared Folder you created above. PREPARED BY RAVI KUMAR LANKE Page 29
  • 30. Navigate to your newly created Dashboard, DemoSettings. Edit the dashboard by placing a new section. In that section, add a text item. Place the following into the text item (making sure to check the Contains HTML Markup box): PREPARED BY RAVI KUMAR LANKE Page 30
  • 31. <script type="text/javascript"> document.getElementById("idPageOptions").style.display = "none"; </script> Welcome to the change password page. This page will allow you to change your password for access to the Business Intelligence reporting application.<br><br> You are currently logged in as <b>@{biServer.variables['NQ_SESSION.USER']}</b>.<br><br> Please click the link below to begin the password reset process. PREPARED BY RAVI KUMAR LANKE Page 31
  • 32. PREPARED BY RAVI KUMAR LANKE Page 32
  • 33. PREPARED BY RAVI KUMAR LANKE Page 33
  • 34. Click Ok. Edit the Column Properties. Click on Custom CSS Style Options (HTML Only) and add the following to the Use Custom CSS Style: position:absolute;height:120px; margin-top:40px; Drag an Action Link below your text item in that same section. Name the link Change Password, and navigate to the saved Action Link you saved to the Shared Folder. Don’t define any values, just click on the Ok button. Click Ok to close the Action Link Properties window. PREPARED BY RAVI KUMAR LANKE Page 34
  • 35. On the main section properties, unselect Collapsible. Additionally, from the Section Properties, set the border position to None. PREPARED BY RAVI KUMAR LANKE Page 35
  • 36. PREPARED BY RAVI KUMAR LANKE Page 36
  • 37. PREPARED BY RAVI KUMAR LANKE Page 37
  • 38. Click the icon to save the dashboard. Click the PREPARED BY RAVI KUMAR LANKE icon to view the results. Page 38
  • 39. PREPARED BY RAVI KUMAR LANKE Page 39
  • 40. OBIEE Server Steps The following steps take place on the OBIEE server. All files references are for a Linux/Solaris install, but file locations will be similar for Windows. Update the following files, to place a link to the Change Password in the header bar: /apps/applobi/OBIEE11g/Oracle_BI1/bifoundation/web/app/res/b_mozilla/header.js /apps/applobi/OBIEE11g/user_projects/domains/bifoundation_domain/servers/bi_server1/tmp/_WL_user/ analytics_11.1.1/7dezjl/war/res/b_mozilla/header.js PREPARED BY RAVI KUMAR LANKE Page 40
  • 41. For these two files, find the line: b.push(new obips.ContextMenu.MenuOption(saw.header.getLocalizedString("kmsgHeaderMyAccou nt"),"",null,new obips.Callback(this,this.onMyAccount))); and replace it with: b.push(new obips.ContextMenu.MenuOption(saw.header.getLocalizedString("kmsgHeaderMyAccou nt"),"",null,new obips.Callback(this,this.onMyAccount)));b.push(new obips.ContextMenu.MenuOption(saw.header.getLocalizedString("kmsgHeaderCustomU RL"),"",null,new obips.Callback(this,this.onCustomURL)));  then find the line: saw.header.NavBar.prototype.onMyAccount=function(){saw.header.Menubar.getMana ger().hidePopupPanel();var a=new saw.ondemandload.FuncProxy("obips.AccountInfo.launchDialog",{messageTemplate: "kuiMyAccountDialogHead"});a.exec()};  and replace it with: saw.header.NavBar.prototype.onMyAccount=function(){saw.header.Menubar.getMana ger().hidePopupPanel();var a=new saw.ondemandload.FuncProxy("obips.AccountInfo.launchDialog", {messageTemplate:"kuiMyAccountDialogHead"});a.exec()};saw.header.NavBar.proto type.onCustomURL=function(){var w = 1920, h = 1080; if (document.all) { w = document.body.clientWidth;h = document.body.clientHeight;x = window.screenTop;y = window.screenLeft;} else if (document.layers) { w = window.innerWidth;h = window.innerHeight;x = window.screenX;y = window.screenY;} var popW = 450, popH = 276;var leftPos = ((w-popW)/2)+y, topPos = ((h-popH)/2)+x;window.open('saw.dll?PortalPages&PortalPath %2Fshared%2FUser%20Account%2F_portal%2FUser%20Settings','passwordresetwindow' ,'toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, PREPARED BY RAVI KUMAR LANKE Page 41
  • 42. directories=no, status=no, width='+popW+',height='+popH+',top='+topPos+',left='+leftPos);}; Note: Replace the bold part with the path to the location you saved the Action Link in OBIEE above. PREPARED BY RAVI KUMAR LANKE Page 42
  • 43. PREPARED BY RAVI KUMAR LANKE Page 43
  • 44. Update the following file to add the resource id /apps/applobi/OBIEE11g/Oracle_BI1/bifoundation/web/msgdb/common/saw.header.xml For this file, add the following line: <resource id="kmsgHeaderCustomURL" /> PREPARED BY RAVI KUMAR LANKE Page 44
  • 45. Save it and exit The next file will not exist out of the box, and needs to be created, along with any folders along the way. /apps/applobi/OBIEE11g/instances/instance1/bifoundation/OracleBIPresentationServicesComponent/core application_obips1/msgdb/l_en/customMessages/uicmsgs/saw.header.xml For this file, you will be creating it, so make the contents: <?xml version="1.0" encoding="utf-8"?> PREPARED BY RAVI KUMAR LANKE Page 45
  • 46. <webmessagetables xmlns:sawm="com.siebel.analytics.web/message/v1"> <webmessagetable lang="en-us" system="saw.header" table="Messages"> <webmessage name="kmsgHeaderCustomURL"><text>Change Password</text></webmessage> </webmessagetable> </webmessagetables> PREPARED BY RAVI KUMAR LANKE Page 46
  • 47. Save it and exit Restart the OBIEE services. You should now see a link under the User menu called Change Password. This will open a new window providing the user with simple instructions to change their password. PREPARED BY RAVI KUMAR LANKE Page 47
  • 48. PREPARED BY RAVI KUMAR LANKE Page 48
  • 49. PREPARED BY RAVI KUMAR LANKE Page 49
  • 50. PREPARED BY RAVI KUMAR LANKE Page 50
  • 51. PREPARED BY RAVI KUMAR LANKE Page 51
  • 52. PREPARED BY RAVI KUMAR LANKE Page 52
  • 53. PREPARED BY RAVI KUMAR LANKE Page 53
  • 54. PREPARED BY RAVI KUMAR LANKE Page 54
  • 55. PREPARED BY RAVI KUMAR LANKE Page 55
  • 56. PREPARED BY RAVI KUMAR LANKE Page 56
  • 57. PREPARED BY RAVI KUMAR LANKE Page 57
  • 58. PREPARED BY RAVI KUMAR LANKE Page 58
  • 59. PREPARED BY RAVI KUMAR LANKE Page 59
  • 60. PREPARED BY RAVI KUMAR LANKE Page 60
  • 61. PREPARED BY RAVI KUMAR LANKE Page 61
  • 62. PREPARED BY RAVI KUMAR LANKE Page 62
  • 63. PREPARED BY RAVI KUMAR LANKE Page 63
  • 64. PREPARED BY RAVI KUMAR LANKE Page 64