alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (run-conf-wjaas.csh)

This example Java source code file (run-conf-wjaas.csh) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

confsecuritylayer, create, for, jaas, kdc, kdc\'s, nullpointerexception, realm, set, the, update, windows

The run-conf-wjaas.csh Java example source code

#!/bin/csh -f
#
# @bug 5014493
# @summary SaslServer.wrap throws NullPointerException when security 
#    layer negotiated
#
# BEFORE running this test, you need to set up the environment as follows.
# 1. Create a 'sample' service principal in the KDC.
# 2. Create a keytab for the server principal 'sample/fqdn@REALM'
#    where 'fqdn' is the fully qualified domain name of the server and
#    REALM is the KDC's realm. The principal must be a host-based service.
#    For example, a principal name might be
#      'sample/machineX.imc.org@IMC.ORG'. 
#    On Windows, for example, you use the ktpass utility to create a host keytab 
#    file.
#    c:> ktpass -princ sample/machineX.imc.org@IMC.ORG -mapuser sample \
#        -ptype KRB5_NT_SRV_HST \
#        -pass servertest123 -out machineX.keytab
# 3. Create a user principal in the KDC.
# 4. Set up a JAAS login module configuration file like gsseg_jaas.conf, updating
#    the client and server entries according to the principal and machine names
#    used.
# 5. Update AuthOnly.SERVER_FQDN with fqdn of server machine.
# 6. To examine exchange, turn on logging by adding
#        -Djava.util.logging.config.file=log.properties
# 7. Update the realm and kdc settings in this script.
#
#
$JAVA_HOME/bin/java -Djava.security.krb5.realm=IMC.ORG -Djava.security.krb5.kdc=machineX.imc.org -Djava.security.auth.login.config=gsseg_jaas.conf  ConfSecurityLayer

Other Java examples (source code examples)

Here is a short list of links related to this Java run-conf-wjaas.csh source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.