DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > File-based User Authentication Under WebSphere 6

File-based User Authentication Under WebSphere 6

Jakub Holý user avatar by
Jakub Holý
·
Apr. 26, 10 · Java Zone · Interview
Like (0)
Save
Tweet
6.77K Views

Join the DZone community and get the full member experience.

Join For Free

When developing a web application for the WebSphere Application Server you sometimes need to enable security because the application expects HttpServletRequest.getUserPrincipal() to be non-null. While in the production environment you will likely configure WAS to delegate the authentication to an LDAP server, during development you would likely prefer to use a simpler method that doesn't depend on an external service (and thus functions even when offline) and doesn't force you to use some real confidential credentials.

The solution is to use the sample custom file-based user registry, which is shipped with WebSphere 6.x and which enables you to define your groups and users in two files. The steps to configure it are quite simple.

1. Open the WAS administration console

2. Configure the custom user registry under Security - Global security - Custom:
2.a Define basic properties:


2.b Define location of the user and group files:


3. Enable security and select the configured custom user registry:




4. ? Add self to the allowed console users (I'm not sure whether this is necessary):


5. Create the users and groups files defined in the step 2.b:
jh_user.props:
# jh_user.props file (user name, password, unique user id, group id, user label)
jholy@at.ibm.com:password:123:567:Jakub Holy
jh_group.props:
# jh_group.props file (group name, unique group id, comma-separated member list,
# a label)
AutomatedBridge_admins:567:jholy@at.ibm.com:AB Admins

6. Restart WAS

7. Log in to the admin console with the credentials you've configured (id jholy@at.ibm.com above).

 

From http://www.jroller.com/holy/entry/file_based_user_authentication_under

authentication

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • The End of the Beginning for Apache Cassandra
  • Top Soft Skills to Identify a Great Software Engineer
  • Enough Already With ‘Event Streaming’
  • How to Test JavaScript Code in a Browser

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo