SPNEGO Configuration Guide
SPNEGO Configuration Guide
Applies To:
SAP NetWeaver Engine
NetWeaver 04 (6.40)
NetWeaver 04S (7.00)
NetWeaver 04S EhP1 (7.01)
NetWeaver 04S EhP2 (7.02)
Summary:
This document contains detailed instructions on installation and configuration of the new
SPNego add-on.
Table of Contents
1. Introduction ........................... 3
2. Prerequisites ....... 4
3. Deployment . 9
4. Access to the user interface 10
5. Creating a new realm 11
6. Configuring the user mapping . 12
7. Configuring the encryption keys .. 16
8. Enabling the realm . 17
9. Adjusting the policy configuration 18
10. Troubleshooting 19
SAP AG 2007
1. INTRODUCTION
The SPNego add-ons purpose is to provide a possible solution to problems caused by the
new releases of Windows platforms (Windows Vista, Windows 7, Windows 2008 R2) which no
longer support DES as the default encryption mechanism. This causes the old
SPNegoLoginModule login module to fail because it cannot decrypt the Kerberos token received in
the request. The current solution supports both DES and RC4-HMAC encryption algorithms.
A workaround provided by Microsoft exists which enables DES encryption on the Domain
Controller and forces it to behave in the same way as in the older Windows versions. More
information can be found in SAP Note 1396724.
This document is targeted specifically at the add-on solution, but chapters 5 through 9 can
be used for configuring the new SPNego in its official release when it becomes available.
SAP AG 2007
2. PREREQUISITES
Depending on whether you have a working configuration of the old SPNegoLoginModule or
not, there can be several prerequisites that must be met before the new configuration can be
finished successfully.
SAP AG 2007
of the keytab file is to transport the encryption keys from the domain controller to the J2EE engine
and once it is uploaded in the new Configuration UI, the file is no longer needed.
Keytab files are created via tools provided by the specific Active Directory vendor, for more
information contact your Active Directory administrator. One tool provided by the JDK itself has
been tested to work. It is called ktab and you can use the following syntax:
ktab a <principal_name>@<REALM> -k <keytab_file_name>
For more information on its full syntax, you can run
ktab help
This tool creates encryption keys for all encryption mechanisms that it supports. If you want
to create a key for DES, you must use ktab provided by JDK1.5 or higher. If you need a key for
RC4-HMAC, you have to use the tool that comes with JDK1.6.
3. Browser the browser must be configured so that it can communicate with the Key
Distribution Center and obtain a valid Kerberos token from it
SAP AG 2007
a) Internet Explorer
enable "Windows Integrated Authentication" Tools -> Internet Options
-> Advanced -> Security
SAP AG 2007
enable automatic logon in intranet zone Tools -> Internet Options ->
Security -> Local Intranet -> Custom level -> "Automatic logon only in Intranet Zone"
SAP AG 2007
add the J2EE engine host name to the list of local intranet sites Tools > Internet Options -> Security -> Local Intranet -> Sites -> Advanced
bypass the proxy server (if present) for the J2EE engine Tools ->
Internet Options -> Connections -> LAN Settings -> Proxy server -> Advanced -> Exceptions
SAP AG 2007
b) Mozilla Firefox
bypass the proxy server (if present) for the J2EE engine Tools ->
Options -> Advanced -> Network -> Settings -> "No proxy for:"
SAP AG 2007
10
3. DEPLOYMENT
There are three deployable components:
spnego.cfg.sda - This is a J2EE library which contains basic functionality
needed by the login module and the configuration UI
spnego.lm.sda - This is a J2EE library which contains the
SPNEGOLoginModule
sap.com~spnego.cfg.wd.ear - This is a WebDynpro application which is used
for configuration of the new SPNEGOLoginModule
The three archives have internal dependencies, but they are only available runtime, not
deploy-time. That's why they must be deployed in a strict order:
1. Firstly, deploy spnego.cfg.sda
2. Secondly, deploy spnego.lm.sda
3. Lastly, deploy sap.com~spnego.cfg.wd.ear
NB! When deploying, do not select all of the archives. Deployment will fail if the
components are not selected as specified above.
These components are deployed online and do not require a server restart.
SAP AG 2007
11
SAP AG 2007
12
This creates a new realm which is not configured and is inactive. If you want to use it you
must configure its user mapping and encryption keys and then activate it.
SAP AG 2007
13
You can define the namespace of a user attribute if applicable. Should you choose to omit it,
the default UME attribute namespace will be used.
Suppose we have a user named "sapdemo" that belongs to the domain
"SPNEGO.SAP.COM". This user will be used in the examples below.
Possible user mappings:
SAP AG 2007
14
SAP AG 2007
15
VII. Mode = " principal and REALM", Source = "ADS Data Source"
This mapping can be used when the data source is LDAP. By default the data source
configuration files provided by SAP contain two user account attributes named "principal" and
"realm". The first one is mapped to the physical attribute "samaccountname" and the second one to nothing. This can be changed, but if you choose not to map any attribute to a physical user
attribute, you are going to have to maintain the value of this attribute manually for every single
user.
This means that the user in the user store must have their "principal" (or mapped) attribute
equal to "sapdemo" and their "realm" (or mapped) attribute equal to "SPNEGO.SAP.COM"
SAP AG 2007
16
SAP AG 2007
17
This step is new compared to the old SPNego configuration UI, but it eliminates the need to
create a connection to the KDC.
Make sure the realm you want to modify is selected and click the "Edit" button. The "Keys"
tab below the realms table becomes active. Navigate to a valid keytab file that contains encryption
keys for the selected realm and upload it. You will be presented with a list of all the valid encryption
keys available in this keytab file. Select the ones you want and click the "OK" button. Do not forget
to save the changes when done.
Note that if you used to have a working SPNego configuration which was completed with the
help of the SPNego Wizard, you can take the keytab file created by the Wizard. It is located on
your central instance under /usr/sap/<SID>/SYS/global/kerberos.
SAP AG 2007
18
Once you configure the realms user mapping and encryption keys, you have to activate it in
order to use it. If you do not activate the realm it will not be used during authentication even though
the rest of its configuration might be correct.
Make sure the realm you want to enable is selected and click the "Edit" button, followed by
the Enable button. Do not forget to save the changes when done.
SAP AG 2007
19
In case you want to use Kerberos authentication for a specific application, you have to find
its policy configuration and add the module there as well.
SAP AG 2007
20
10. TROUBLESHOOTING
Deploy the Web diagtool from SAP Note 1045019 on the J2EE server, run it and perform the
following steps:
1.
2.
3.
4.
5.
Then reproduce the problem and stop the tool. The generated zip file will contain traces that
might help you figure out what is going wrong. If you are unable to do so, report a message in the
BC-JAS-SEC component and attach this archive. Don't forget to include details about how you
reproduce the problem along with the exact version of your engine.
SAP AG 2007