Using Rules Based on Client Certificate Subject Names

Use

You can use this configuration mode to determine the user ID from theSubjectNamefield of the certificate.You use the configuration options for theClientCertLoginModuleto configure the rules to determine the user ID based on theSubjectNamefield in the client certificate.

To enable the use of certificate authentication, you add theClientCertLoginModuleto the login module stack for the J2EE applications to use certificate authentication.

Procedure

Using the J2EE Engine Visual Administrator, go to the configuration options for theClientCertLoginModule. For more information, see Managing Login Modules .

EntersubjectNameas a value for the optionRule<n>.getUserFromof theClientCertLoginModule

Enter a value for the optionRule<n>.AttributeNameofClientCertLoginModuleto specify the attribute of the certificateSubjectNamefield, which identifies the J2EE Engine user ID.

If an attribute name for the value that you enter does not exist in theSubjectNamefield of the certificate, then theClientCertLoginModuledetermines the user ID from the first existing attribute name in the certificateSubjectNamefield.

If theSubjectNamefield contains more than one matching attribute name, then theClientCertLoginModuledetermines the user ID from the first matching attribute name in the certificateSubjectNamefield.



This is a mandatory configuration step. Not providing a value for this option results in the certificates used for authentication being rejected.

To use rules for filtering the provided client certificates, see Defining Rules For Filtering Client Certificates .

Substitute<n>in the Rule<n>prefix of theClientCertLoginModuleconfiguration options to match the place of this rule in the sequence of configured rules for client certificate authentication. If you use a single rule, then substituteRule<n>withRule1

Add theClientCertLoginModuleto the login module stacks of the J2EE applications to authenticate users based on client certificate subject names.

Result

Users that authenticate to the J2EE Engine with client certificates can log on with user IDs that correspond to the rule for theSubjectNamefield attribute that you configured.

Example

The exampleClientCertLoginModuleconfiguration below assumes that a user provides a X.509 certificate with the following attributes for the certificateSubjectNamefield:

CN= myuser, OU= people, OU= CA, O= mycompany, C= DE

Determining user ID from attribute CN of certificate SubjectName

Option

Value

Rule1.getUserFrom

subjectName

Rule1.AttributeName

CN

Result:The authenticated J2EE Engine user ID ismyuser

Determining the user ID from multiple attribute names in the certificate SubjectName

Option

Value

Rule1.getUserFrom

subjectName

Rule1.AttributeName

OU

Result:The authenticated J2EE Engine user ID ispeople, matching the first leftmost occurrence of theSubjectNameattributeOU