Skip navigation.

Avitek Medical Records Development Tutorials

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

 


Moving to Production

 


Tutorial 16: Creating Users, Groups, and Global Security Roles

This tutorial describes how to create the users, groups, and global security roles that are required by the MedRec application.

After you finish this tutorial, you will be able to log in to all three MedRec Web applications as the appropriate type of user (administrator, patient, or physician) and start using the application.

The tutorial includes:

 


Prerequisites

Before starting this tutorial:

 


Procedure

To create the required users, groups, and security roles using the Administration Console:

Step 1: Specify security realm settings.

  1. With MedRecServer running, open the Administration Console by navigating in a browser to:
  2. http://host:7101/console

    where host refers to the computer on which MedRecServer is running. If your browser is on the same computer as MedRecServer, you can use the URL http://localhost:7101/console.

  3. Specify weblogic for both the username and password and click Log In.
  4. If you have not already done so, click Lock & Edit, located in the upper left Change Center window of the Administration Console.
  5. In the middle left-hand pane called Domain Structure, click MedRecDomain—>Security Realms.
  6. In the Realms table in the right pane, click myrealm.
  7. Select the Configuration—>General tab.
  8. From the Check Roles and Policies drop-down menu, select All Web Applications and EJBs.
  9. This setting means that the WebLogic Security Service will perform security checks on all URL (Web) and EJB resources. For more information, see Understanding How to Check Security Roles and Security Policies in Securing WebLogic Resources.

  10. In the When Deploying Web Applications or EJBs drop-down menu, select Ignore Roles and Policies From DD.
  11. This setting indicates that you will set security for Web Application and EJB resources in the Administration Console, not in deployment descriptors. For more information, see Understanding the On Future Redeploys Setting in Securing WebLogic Resources.

  12. Click Save.
  13. In the Change Center, click Activate Changes to update the MedRec server configuration.
  14. Restart MedRecServer. (See Starting and Stopping Servers: Quick Reference in Managing Server Startup and Shutdown.)

Step 2: Create groups.

  1. In the left Domain Structure pane of the Administration Console, click MedRecDomain—>Security Realms.
  2. In the Realms table in the right pane, click myrealm.
  3. Select the Users and Groups—>Groups tab.
  4. The Groups table displays all groups currently defined in the WebLogic Authentication provider's database.

  5. Click New.
  6. In the Name field, enter MedRecAdmins.
  7. In the Description field, enter MedRecAdmins can log on to the MedRec Administrators Web site.
  8. In the Provider drop-down list, select DefaultAuthenticator (default value).
  9. Click OK.
  10. Repeat steps 4 - 8 to create a group named MedRecPatients, with a description of MedRecPatients can log on to the MedRec Patients Web site, and DefaultAuthenticator provider.
  11. Repeat steps 5 - 9 to create a group named MedRecPhysicians, with a description of MedRecPhysicians can log on to the MedRec Physician Web site, and DefaultAuthenticator provider.
  12. In the Groups table, confirm that the three groups have been added.

Step 3: Create users and add the users to groups.

  1. In the left Domain Structure pane of the Administration Console, click MedRecDomain—>Security Realms.
  2. In the Realms table in the right pane, click myrealm.
  3. Select the Users and Groups—>Users tab.
  4. The Users table displays all users currently defined in the WebLogic Authentication provider's database.

  5. Click New.
  6. In the Name field, enter admin@avitek.com.
  7. In the Description field, enter MedRec administrator.
  8. In the Provider drop-down list, select DefaultAuthenticator (default value).
  9. In the Password and Confirm Password fields, enter weblogic.
  10. Click OK to save your changes.
  11. In the Users table, click admin@avitek.com.
  12. Select the Groups tab.
  13. In the Available choice box, highlight the MedRecAdmins group.
  14. Click the highlighted arrow to move the MedRecAdmins group from the Available to the Chosen choice box.
  15. Click Save.
  16. Repeat steps 1 - 14 to create a user named mary@md.com, a MedRec physician who also uses the weblogic password and the DefaultAuthenticator provider, and belongs in the MedRecPhysicians group.
  17. Repeat steps 1 - 14 to create a user named larry@bball.com, a MedRec patient who also uses the weblogic password and the DefaultAuthenticator provider, and belongs in the MedRecPatients group.
  18. Repeat steps 1 - 14 to create a user named medrec_webservice_user, a MedRec Web Service User who also uses the weblogic password and the DefaultAuthenticator provider, and belongs in the MedRecPhysicians group.
  19. Repeat steps 1 - 3 to navigate to the Users table of the myrealm security realm to confirm that the three users have been added.

Step 4: Create global roles and grant the global roles to the groups.

  1. In the left Domain Structure pane of the Administration Console, click MedRecDomain—>Security Realms.
  2. In the Realms table in the right pane, click myrealm.
  3. Select the Roles and Policies—>Roles tab.
  4. The Roles table displays all global and scoped roles currently defined in the WebLogic Role Mapping provider's database.

  5. In the Roles table, expand Global Roles and click Roles.
  6. The Global Roles table displays all global roles currently defined in the WebLogic Role Mapping provider's database.

  7. Click New.
  8. In the Name field, enter MedRecAdmin.
  9. Click OK.
  10. In the Global Roles table, click MedRecAdmin.
  11. In the Global Role Conditions page, click Add Conditions.
  12. In the Choose a Predicate page, select Group for the Predicate List.
  13. Click Next.
  14. In the Group Argument Name field, enter MedRecAdmins.
  15. Click Add.
  16. Click Finish.
  17. The Role Conditions table includes the following entry:

    Group MedRecAdmins
  18. Click Save.
  19. Repeat steps 1 - 15 to create a global role named MedRecPatient and to grant this global role to the MedRecPatients group.
  20. Repeat steps 1 - 15 to create a global role named MedRecPhysician and to grant this global role to the MedRecPhysicians group.
  21. Repeat steps 1 - 4 to view the Global Roles table and confirm that the three new global roles have been added.

Step 5: Log in to and use the MedRec applications.

Now that you have created all the required users, groups, and roles, you can actually log in to the various MedRec Web applications and start using them. First navigate to the following start page in a browser:

http://host:7101/start.jsp

In the preceding URL, host refers to the computer that hosts MedRecServer. If your browser is on the same computer as MedRecServer, you can use localhost; for example: http://localhost:7101/start.jsp.

The main MedRec application page appears. Click on the links to log in in to the different Web applications, using the following username/passwords:

 


Best Practices

 


The Big Picture

The MedRec application has been coded such that only certain roles are allowed to access certain modules, in particular login to Web Applications such as patient, physician, and admin. This tutorial showed you first how to create groups to represent patients, administrators, and physicians, then how to create individual users and assign them to a particular group, and finally, how to map a group to a role. Once this security configuration is in place, you can log in to the applications using the appropriate user.

You might have noticed, however, that in Step 3: Create users and add the users to groups., you did not create an actual patient user. This is because patients, along with their personal information, are stored in the PointBase database and are authenticated using a Custom DBMS Authenticator. The database also stores the group to which the user is assigned. You must, however, use the Administration Console to create the MedRecPatients group and the MedRecPatient role, and then map the group to the role.

The next tutorials show how to secure specific resources, such as Web applications and EJBs.

 


Related Reading

 

Skip navigation bar  Back to Top Previous Next