JNDI,AD,Kerberos Authentication, Windows

Hi all,
OS:
Server: LDAP Server AD running on win2k server with KDC on the same machine
Client: Sun's JNDI application on WinXP
Senario:
I managed to make the well-known tutorial example (list 1) work well on both jdk1.4.2_05 and jdk1.5.1_02. The main steps can be summarized as
step 1: Kerberose authtication with lc.login() based on JAAS
step 2: Assume the identity of the authenticated subject
step 3: Run JNDI client application under this identity with Subject.doAS()
Problem:
It's very hard to force users to run their JNDI applications UNDER step 1 & 2. As you know, step 3 is run by a spawn child's thread and for this reason it's very hard to convince users including myself of doing SSO in this way. There should be a better way. Actually, KDC's realm is built in such a way that all applications and computers under the same realm should be SSO Kerberose aware -- that is -- once the intial authentication is done, the identity assuming should be valid for the entire login session (usually 8~10 hours).
Solution:
Step 0: Create client's user account 'testuser' on AD
Step 1: Initially login using command kinit()
C\: kinit test
Password for testuser@REALM:mypassword
New ticket is stored in cache file C:\Documents and Settings\abc\kerb5cc_abc
Step 2: Run JNDI client application (list 2)
Error:
GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos Ticket)
     at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:133)
     at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:72)
     at sun.security.jgss.GSSManagerImpl.getCredentialElement(GSSManagerImpl.java:149)
     at sun.security.jgss.GSSCredentialImpl.add(GSSCredentialImpl.java:389)
     at sun.security.jgss.GSSCredentialImpl.<init>(GSSCredentialImpl.java:60)
     at sun.security.jgss.GSSCredentialImpl.<init>(GSSCredentialImpl.java:37)
     at sun.security.jgss.GSSManagerImpl.createCredential(GSSManagerImpl.java:96)
     at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:178)
     at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:158)
     at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:155)
     at com.sun.jndi.ldap.sasl.LdapSasl.saslBind(LdapSasl.java:105)
     at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:214)
     at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2637)
     at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
     at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
     at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
     at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
     at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
     at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
     at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
     at javax.naming.InitialContext.init(InitialContext.java:223)
     at javax.naming.InitialContext.<init>(InitialContext.java:197)
     at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
     at JndiClientAction.main(JndiClientAction.java:61)
javax.naming.AuthenticationException: GSSAPI [Root exception is javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided]]
     at com.sun.jndi.ldap.sasl.LdapSasl.saslBind(LdapSasl.java:150)
     at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:214)
     at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2637)
     at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
     at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
     at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
     at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
     at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
     at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
     at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
     at javax.naming.InitialContext.init(InitialContext.java:223)
     at javax.naming.InitialContext.<init>(InitialContext.java:197)
     at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
     at JndiClientAction.main(JndiClientAction.java:61)
Caused by: javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided]
     at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:174)
     at com.sun.jndi.ldap.sasl.LdapSasl.saslBind(LdapSasl.java:105)
     ... 13 more
Caused by: GSSException: No valid credentials provided
     at sun.security.jgss.GSSCredentialImpl.<init>(GSSCredentialImpl.java:69)
     at sun.security.jgss.GSSCredentialImpl.<init>(GSSCredentialImpl.java:37)
     at sun.security.jgss.GSSManagerImpl.createCredential(GSSManagerImpl.java:96)
     at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:178)
     at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:158)
     at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:155)
     ... 14 more
SOS:
Can anyone pin point what's going wrong?
Thanks in advance
Spencer
------------------- LIST 1 -------------------
import javax.naming.*;
import javax.naming.directory.*;
import javax.security.auth.login.*;
import javax.security.auth.Subject;
import com.sun.security.auth.callback.TextCallbackHandler;
import java.util.Hashtable;
* Demonstrates how to create an initial context to an LDAP server
* using "GSSAPI" SASL authentication (Kerberos v5).
* Requires J2SE 1.4, or JNDI 1.2 with ldapbp.jar, JAAS, JCE, an RFC 2853
* compliant implementation of J-GSS and a Kerberos v5 implementation.
* Jaas.conf
* racfldap.GssExample {com.sun.security.auth.module.Krb5LoginModule required client=TRUE useTicketCache=true doNotPrompt=true; };
* 'qop' is a comma separated list of tokens, each of which is one of
* auth, auth-int, or auth-conf. If none is supplied, the default is 'auth'.
class KerberosExample {
public static void main(String[] args) {
java.util.Properties p = new java.util.Properties(System.getProperties());
p.setProperty("java.security.krb5.realm", "MYCOMPANY.ORG");
p.setProperty("java.security.krb5.kdc", "mydomaincontroller.mycompany.org");
p.setProperty("java.security.auth.login.config", "C:\\WINNT\\jaas.conf");
System.setProperties(p);
// 1. Log in (to Kerberos)
LoginContext lc = null;
try {
lc = new LoginContext(GssExample.class.getName(),
new TextCallbackHandler());
// Attempt authentication
lc.login();
} catch (LoginException le) {
System.err.println("Authentication attempt failed" + le);
System.exit(-1);
// 2. Perform JNDI work as logged in subject
Subject.doAs(lc.getSubject(), new LDAPAction(args));
// 3. Perform LDAP Action
* The application must supply a PrivilegedAction that is to be run
* inside a Subject.doAs() or Subject.doAsPrivileged().
class LDAPAction implements java.security.PrivilegedAction {
private String[] args;
private static String[] sAttrIDs;
private static String sUserAccount = new String("testuser");
public LDAPAction(String[] origArgs) {
this.args = (String[])origArgs.clone();
public Object run() {
performLDAPOperation(args);
return null;
private static void performLDAPOperation(String[] args) {
// Set up environment for creating initial context
Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
// Must use fully qualified hostname
env.put(Context.PROVIDER_URL, "ldap://mydomaincontroller.mycompany.org:389/DC=mycompany,DC=org");
// Request the use of the "GSSAPI" SASL mechanism
// Authenticate by using already established Kerberos credentials
env.put(Context.SECURITY_AUTHENTICATION, "GSSAPI");
env.put("javax.security.sasl.server.authentication", "true");
try {
/* Create initial context */
DirContext ctx = new InitialDirContext(env);
/* Get the attributes requested */
Attributes aAnswer =ctx.getAttributes( "CN="+ sUserAccount + ",OU=mydivision,OU=Departments");
NamingEnumeration enumUserInfo = aAnswer.getAll();
while(enumUserInfo.hasMoreElements()) {
System.out.println(enumUserInfo.nextElement().toString());
// Close the context when we're done
ctx.close();
} catch (NamingException e) {
e.printStackTrace();
------------------- LIST 2 ------------------------------
import javax.naming.*;
import javax.naming.directory.*;
import java.util.Hashtable;
class JNDIClientAction {
private static String[] sAttrIDs;
private static String sUserAccount = new String("testuser");
public static void main(String[] args) {
// Set up environment for creating initial context
Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
// Must use fully qualified hostname
env.put(Context.PROVIDER_URL, "ldap://mydomaincontroller.mycompany.org:389/DC=mycompany,DC=org");
// Request the use of the "GSSAPI" SASL mechanism
// Authenticate by using already established Kerberos credentials
env.put(Context.SECURITY_AUTHENTICATION, "GSSAPI");
try {
/* Create initial context */
DirContext ctx = new InitialDirContext(env);
/* Get the attributes requested */
Attributes aAnswer =ctx.getAttributes( "CN="+ sUserAccount + ",OU=mydivision,OU=Departments");
NamingEnumeration enumUserInfo = aAnswer.getAll();
while(enumUserInfo.hasMoreElements()) {
System.out.println(enumUserInfo.nextElement().toString());
// Close the context when we're done
ctx.close();
} catch (NamingException e) {
e.printStackTrace();
}

Hi,
these Notes will help you :
Note 352295 - Microsoft Windows Single Sign-On options
Note 595341 - Installation issues with Single Sign-On and SNC
Note 1580808 - SAP Logon 7.20: "SNC logon w/o SSO" for connection entry
http://help.sap.com/saphelp_nwes72/helpdata/en/44/0ea40dc6970d1ce10000000a114a6b/frameset.htm
For Windows SAP Servers pls download the libs of note 352295.
For Linux use the one on OS level  ( /usr/lib64/libgssapi_krb5.so )
For Linux make sure that the krb5 rpm packages are installed
krb5-32bit.......
krb5-...............
krb5-client.......
I hope this helps
greetings
oliver

Similar Messages

  • Safari on Windows - Kerberos Authentication

    Am facing issues with Kerberos authentication with Safari on windows. IE, Chrome and FF works. Compared the wireshark traces and found that kerberos request made by IE, chrome etc is for server name : HTTP/myappname, while the same for Safari is krbtgt/diffdomain. Safari request for krbtgt/diffdomain fails with unknown principal name error. Seems to be Safari not reusing the TGT and trying to get a new TGT and that too for a different domain. Any thoughts please?

    Hi.
    Read here  >  Apple apparently kills Windows PC support in Safari 6.0
    Use Chrome, IE or Firefox.

  • Windows AD with Kerberos authentication not supported for NW AS JAVA 7.1

    The Admin guide for BO 3.1 states that Windows AD with Kerberos authentication is not supported on NetWeaver AS.
    Can anybody suggest & confirm on this???

    I know we haven't been receiving cases for it, but I think in theory it should work fine. BO doesn't really care what web/app kerberos comes from as the manual authentication uses the java SDK (i.e tomcat 5.5 would use Sun JDK 1.5), and SSO kerberos (vintela) uses 3rd party libraries. It's possible our 3rd party libraries may not support netweaver yet. If I hear anything else I'll post.
    Regards,
    Tim

  • Kerberos Authentication on Windows 7

    I'm trying to authenticate using Kerberos Authentication. Let's say the server is oracle.mydomain.com, and the kdc is kdc.sub.mydomain.com. Now, I have one machine that is joined to the sub.mydomain.com domain, and another machine which is on a totally different domain thatdomain.com.
    Now, I use this as my krb5.ini file
    [libdefaults]
    default_realm = sub.mydomain.com
    dns_lookup_kdc = true
    dns_lookup_realm = true
    [realms]
    sub.mydomain.com = {
    default_domain = sub.mydomain.com
    kdc = kdc.sub.mydomain.com
    and on the machine that is joined to the sub domain, it connects. If I use the same file for the other machine, I get "Status : Failure - Test failed: Peek timed out". Now I tried kinit on that machine "kinit testacct" and it properly gives me "Enter password for [email protected]" to which I enter the password and it gives me "New ticket is stored in cache file C:\Users\testacct\krb5cc_testacct", so that seems to be working, I just don't know why the SQL developer doesn't. Any ideas? Does the machine have to be joined to the domain in order to work with kerberos? FYI I have tried and I can ping the servers and telnet to the oracle server port, so it doesn't seem like a network issue...?
    The machine that is connecting is on the same subnet and uses the same DNS servers, it is just joined to a different domain.
    Edited by: 850630 on Apr 14, 2011 5:38 AM
    Edited by: 850630 on Apr 14, 2011 5:39 AM

    Hi ElementZero,
    I would still try to get thick kerberos working with for example sqlplus before you try thin.
    To help rule out kerberos version incompatibilities and configuration issues.
    For your information: my oracle krb5.conf set in database advanced properties was:
    [libdefaults]
    default_realm = example.COM
    [realms]
    US.ORACLE.COM = {
    kdc = KERBEROS_SERVER.example.com
    default_domain = example.com
    admin_server = KERBEROS_SERVER.example.com
    [domain_realm]
    .us.oracle.com = EXAMPLE.COM
    us.oracle.com = EXAMPLE.COM
    .ie.oracle.com = EXAMPLE.COM
    ie.oracle.com = EXAMPLE.COM
    If you set the kerberos cache entry in database advanced preferences to an new file you will have
    to enter a new password in sqldeveloper.
    Turloch
    -SQLDeveloper Team

  • Portal Drive Single Sign On and Kerberos Authentication

    Hi,
    We are using NW2004s SP10 Portal and we have successfully configured Kerberos authentication with Windows Active Directory 2003. To access the KM Content in windows explorer format, we are using Portal Drive but Portal Drive still asks for authentication i.e. SSO is not working for Portal Drive. I have understood from the forums and sap help site that SSO from portal drive will work only for NTLM authentication and client certificates. Can you please help regarding below questions.
    1. Can Kerberos and NTLM authentication be configured together.
    2. If yes, what are the steps to configure NTLM authentication for NW2004s SAP Portal and Active Directory 2003.
    3. Any other approach to make Portal Drive SSO work.
    Helpful answers will be rewarded.
    Regards,
    Chandra

    Hi Gregor,
    I did two things:
    first i made a change in the portalapp.xml in the PAR file "com.sap.km.cm.par". In the section authentication scheme for "docs" I changed the authentication scheme to "default" to make sure that documents are opened using the default authentication scheme (SPNego) instead of basic authentication
    second, I used the SPNego wizard to configure SPNego. So I didn't adjust anything in the Visual Admin or the authentication template apart from adding the Template to the Ticket policy configuration.
    Again, this only worked after installing the latest vesion.
    Hope this helps
    Marcel

  • Kerberos Authentication between Sharepoint 2013 Foundation - SSRS 2012 - Oracle 11g failing with ORA-12638: Credential retrieval failed

    I have set up SharePoint 2013 Foundation, SharePoint Reporting Services and SQL Server 2012 in a single server. I then created a Data Connection to Oracle 11g. Upon testing the connection, it throws the error “ORA-12638: Credential retrieval failed”.
    Given below are the steps of installation and configuration.
    Installation till basic authentication:
    The installation has been done in a
    single server.
    Installed SQL Server 2012 (Developer version).
    Selected only the following features:
    Database Engine Services
    Analysis Services
    Reporting Services – SharePoint
    Reporting Services Add-in for SharePoint Products
    Management Tools – Basic
    - Management Tools - Complete
      2. Installed SQL Server 2012 SP1.
      3. Installed SQL Server 2012 SP2.
      4. Installed SharePoint Foundation 2013.
      5. Created web application (without Kerberos; we did not even create the SPNs).
          The application pool has been configured to use Reporting Services account since it is a single server installation. This account has been registered as a managed
    account.
      6. Created Site Collection.
      7. Verified that Reporting Services is not installed.
      8. Installed SharePoint Reporting Services from SharePoint 2013 Management Shell.
      9. Verified that Reporting Services is installed.
     10. Created a new SQL Server Reporting Services Service Application and associated the Web Application to the new SQL server Reporting Services Service Application.
      11. Verified that SQL Server Reporting Services Service Application and its proxy have started. Reset IIS.
      12. Created a Site.
      13. Created a Data Connection library with “Report Data Source” content type.
      14. Created a Report Model library with “Report Builder Model” content type.
      15. Created a Report library with “Report Builder Report” content type.
      16. Uploaded an SMDL to the Report Model library.
      17. Added the top level site to Local Intranet instead of as a Trusted Site in the browser settings.
      18. Able to create and save a report using Report Builder.
    Hence, basic authentication is working and SSRS is able to connect to Oracle database.
    Next we have to configure Kerberos settings between SharePoint and SQL Server.
    Implementation of Kerberos authentication
    In the Report Server machine, opened the file C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\WebServices\Reporting\rsreportserver.config  and added the Authentication Types of RSWindowsNegotiate
    and RSWindowsKerberos.
     2.  Set up the following SPNs.
                   a) SQL Server Database Engine service (sqlDbSrv2):
                    setspn -S MSSQLSvc/CER1110:1433 CERDEMO\sqlDbSrv2
                    setspn -S MSSQLSvc/CER1110.cer.demo.com:1433 CERDEMO\sqlDbSrv2
                 In the Delegation tab of the account, selected "Trust this user for delegation to any service (Kerberos only)".
    b) Account: SharePoint Setup Admin account (spAdmin2)
         setspn -S HTTP/CER1110:9999 CERDEMO\spAdmin2
                    setspn -S HTTP/CER1110.cer.demo.com:9999 CERDEMO\spAdmin2
                    In the Delegation tab of the account, selected "Trust this user for delegation to any  service
    (Kerberos only)".
    c) Account: SQL Server Reporting Service account (sqlRepSrv2)
                       setspn -S HTTP/CER1110 CERDEMO\sqlRepSrv2
                       setspn -S HTTP/CER1110.cer.demo.com CERDEMO\sqlRepSrv2
                       In the Delegation tab of the account, selected "Trust this user for delegation to any service
    (Kerberos only)".
      3. Configure the Web Application to use “Negotiate (Kerberos)”.
      4. Logged in as SharePoint Administrator to the SharePoint server and opened the top level site in the IE browser.
         The Event Viewer logged the login process for the SharePoint Administration account as
    Negotiate and not Kerberos.
      5. Implemented Kerberos for Oracle database and client.
         Able to connect to the Oracle database via Kerberos authentication using SQL Plus.
      6. Turn on Windows Firewall.
      7. While testing the site's data connection using Kerberos settings, got the error
    “Can not convert claims identity to windows token. This may be due to user not logging in using windows credentials.”
          Note: The Data Connection for basic authentication still worked.
      8. Created a Claims to Windows Token Service account (spC2WTS2).
      9. Started the Claims to Windows Token Service.
     10. Registered the Claims to Windows Token Service account as a Managed Account.
     11. Changed the Claims To Windows Token Service to use the above managed account.
     12. Verified that the Claims to Windows Token Service account (spC2WTS2) is automatically added to the WSS_WPG local group on the SharePoint box.
          Note: The Reporting Services service account is also a part of the WSS_WPG local group.
     13. Added the Claims to Windows Token Service account (spC2WTS2) to the Local Admin Group on the machine having the SharePoint App Server.
     14. In the SharePoint box, added the Claims to Windows Token Service account (spC2WTS2) in the Act as part of the operating system policy right.
     15. The Claims to Windows Token Service account (spC2WTS2) has the WSS_WPG group configured.
          When the C2WTS service was configured to use the managed account Claims to Windows Token Service account (spC2WTS2) earlier, the spC2WTS2 account was automatically
    added to the WSS_WPG local group on the SharePoint box. The WSS_WPG group in turn is configured in c2wtshost.exe.config file.
     16. Verified that the Reporting Services account is a managed account and part of the WSS_WPG group.
     17. Earlier Service Application Pool - SQL Server Reporting Services App Pool service was associated with the SharePoint Admin account.
          Changed this to associate the Reporting Service account with the Service Application Pool - SQL Server Reporting Services App Pool service.
     18. Changed the delegation of the Reporting Service account to constrained delegation with Protocol Transitioning. This is because we are transitioning from one authentication scheme (Claims) to another (Windows Token).
          For this, the delegation has been changed to "Trust this user for delegation to specified services only". Also, selected the sub radio button "Use
    any authentication protocol". Selected the Oracle Kerberos service as the service to which this account can present delegated credentials.
          Note: The Reporting Service account already had an HTTP SPN.
     19. Next, the goal was to make the Claims To Windows Token Service account match the Reporting Service account.
           For this, we created a fake SPN for the Claims To Windows Token Service account since the delegation tab was missing.
           The delegation has been changed to "Trust this user for delegation to specified services only". Also, selected the sub radio button "Use any
    authentication protocol". Selected the Oracle Kerberos service as the service to which this account can present delegated credentials.
     20. Restarted the SharePoint server.
     21. Tested the data connection with the Kerberos settings again.
           Got the error
    “ORA-12638: Credential retrieval failed”.
    Can anyone tell me what is wrong with this setup?

    http://www.freeoraclehelp.com/2011/10/kerberos-authentication-for-oracle.html
    Problem4: ORA-12638: Credential retrieval failed
    Solution:  Make sure that SQLNET.KERBEROS5_CC_NAME is set in sqlnet.ora and okinit has been run before attempting to connect to the database.
    Do check 
    http://webcache.googleusercontent.com/search?q=cache:5a2Pf3FH7vkJ:externaltable.blogspot.com/2012/06/kerberos-authentication-and-proxy-users.html+&cd=5&hl=en&ct=clnk&gl=in
    If this helped you resolve your issue, please mark it Answered. You can reach me through http://itfreesupport.com/

  • WinRM cannot process the request. The following error occured while using Kerberos authentication: The network path was not found.

    I have two forests with a transitive on-way trust between them: PROD -> TEST (test trusts PROD). I had previously had kerberos authentication working with winrm from PROD to machines in TEST. I have verified the trust is healthy, I also verified users
    in TEST can use WINRM with kerberos just fine. Users from PROD cannot connect via kerberos to machines in TEST with winrm.
    I have verified the service has registered the appropriate SPNs. I ran dcdiag against all my PROD and TEST domain controllers and didn't find anything that would prevent kerberos from happening. I even tried disabling the firewall entirely on my TEST dcs
    but that didn't gain me anything.
    I've enabled kerberos logging but only see the expected errors such as it couldn't find a PROD SPN for the machine, which it shouldn't from what I understand, it should go to the TEST domain and find the SPN from there.
    I'm really out of next steps before I call PSS and hope someone here has run into this and could provide me some next steps.
    PowerShell Error:
    Connecting to remote server failed with the following error message : WinRM cannot process the request. The following error occured while using Kerberos authentication: The network path was not found.  
     Possible causes are:
      -The user name or password specified are invalid.
      -Kerberos is used when no authentication method and no user name are specified.
      -Kerberos accepts domain user names, but not local user names.
      -The Service Principal Name (SPN) for the remote computer name and port does not exist.
      -The client and remote computers are in different domains and there is no trust between the two domains.
     After checking for the above issues, try the following:
      -Check the Event Viewer for events related to authentication.
      -Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or use HTTPS transport.
     Note that computers in the TrustedHosts list might not be authenticated.
       -For more information about WinRM configuration, run the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.
        + CategoryInfo          : OpenError: (:) [], PSRemotingTransportException
        + FullyQualifiedErrorId : PSSessionStateBroken
    winrs Error:
    Winrs error:
    WinRM cannot process the request. The following error occured while using Kerberos authentication: The network path was not found.  
     Possible causes are:
      -The user name or password specified are invalid.
      -Kerberos is used when no authentication method and no user name are specified.
      -Kerberos accepts domain user names, but not local user names.
      -The Service Principal Name (SPN) for the remote computer name and port does not exist.
      -The client and remote computers are in different domains and there is no trust between the two domains.
     After checking for the above issues, try the following:
      -Check the Event Viewer for events related to authentication.
      -Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or use HTTPS transport.
     Note that computers in the TrustedHosts list might not be authenticated.
       -For more information about WinRM configuration, run the following command: winrm help config.

    Hi Adam,
    I'm a little unclear about which SPNs you were looking for, in which case could you confirm you were checking that on the computer object belonging to the actual destination host it has the following SPNs registered?
    WSMAN/<NetBIOS name>
    WSMAN/<FQDN>
    If you were actually trying to use WinRM to connect to the remote forest's domain controllers, then what you said makes sense, but I was caught between assuming this was the case or you meant another member server in that remote forest.
    Also, from the client trying to connect to this remote server, are you able to telnet to port 5985? (If you've used something other than the default, try that port)
    If you can't, then you've got something else like a firewall (be that the Windows firewall on the destination or a hardware firewall somewhere in between) blocking you at the port level, or the listener on the remote box just isn't working as expected. I
    just replied to your other winrm post with steps for checking the latter, so I won't repeat myself here.
    If you can telnet to it and the SPNs exist, then you might be up against something called selective authentication which has to do with how the trust was defined. You can have a read of
    this to learn a bit more about selective trusts and whether or not it's affecting you.
    Cheers,
    Lain

  • The KDC encountered duplicate names while processing a Kerberos authentication request in a Domain controller server

    HI
    we have a sharepoint farm and in domain controller server, this error is in event viewer
    Log Name:      System
    Source:        Microsoft-Windows-Kerberos-Key-Distribution-Center
    Date:          9/15/2014 10:44:15 PM
    Event ID:      11
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      XXXAPP01.xxxportal.com
    Description:
    The KDC encountered duplicate names while processing a Kerberos authentication request. The duplicate name is HTTP/XXXWFE01.xxxportal.com (of type DS_SERVICE_PRINCIPAL_NAME). This may result in authentication failures or downgrades to NTLM. In order to prevent
    this from occuring remove the duplicate entries for HTTP/XXXWFE01.xxxportal.com in Active Directory.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-Kerberos-Key-Distribution-Center" Guid="{3FD9DA1A-5A54-46C5-9A26-9BD7C0685056}" EventSourceName="KDC" />
        <EventID Qualifiers="49152">11</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2014-09-15T19:44:15.000000000Z" />
        <EventRecordID>131824</EventRecordID>
        <Correlation />
        <Execution ProcessID="0" ThreadID="0" />
        <Channel>System</Channel>
        <Computer>XXXAPP01.xxxportal.com</Computer>
        <Security />
      </System>
      <EventData>
        <Data Name="Name">HTTP/XXXWFE01.xxxportal.com</Data>
        <Data Name="Type">DS_SERVICE_PRINCIPAL_NAME</Data>
        <Binary>
        </Binary>
      </EventData>
    </Event>
    adil

    Hi adil,
    Service principal names (SPNs) are stored as a property of the associated account object in Active Directory
    Domain Services (AD DS). I noticed that you have used setpn –X to identify the duplicate SPN. Please refer to following articles and check if help you to solve this issue.
    Event ID 11 — Service Principal
    Name Configuration
    Event ID 11 in the System log of domain controllers
    Please also refer to following article and check if can help you.
    The problem with duplicate SPNs
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft
    does not guarantee the accuracy of this information.
    If any update, please feel free to let me know.
    Hope this helps.
    Best regards,
    Justin Gu

  • Question about Java GSS-Kerberos authentication

    Hi,
    I am new to GSS API. I have a client requirement to use Java GSS Kerberos Authentication instead of using IIS for Integrated Windows Authentication. In IWA, the IE browser automatically picks up the logged-in windows user credentials and passes it to IIS, which authenticates you against Active Directory and returns SUCCESS.
    We are planning to write a Servlet/JSP code on Apache Tomcat on Solaris 10, which uses Java GSS API to do Kerberos Authentication and return SUCCESS to the user. When I look at the examples:
    http://java.sun.com/j2se/1.4.2/docs/guide/security/jgss/tutorials/AcnOnly.html#RunAc
    it says:
    "You will be prompted for your Kerberos user name and password, and the underlying Kerberos authentication mechanism specified in the login configuration file will log you into Kerberos. If your login is successful, you will see the following message: Authentication succeeded!"
    Does this mean that in Kerberos Authentication using Java GSS API, the user will have to enter his windows credentials for authentication? Is there a way for the credentials to be passed from Windows automatically to the API, without user intervention?
    Any links detailing the procedure would be of great help.
    Thanks,
    shetty2k

    We are having a similar requirement from our end. To make situation worst I do not even have an idea about an approach.
    What are the ways that we can use windows credentials to authenticate against IIS with tomcat?
    any help is greatly appreciated.
    R.

  • EP 6.0 SP2 + external kerberos authentication

    We recently installed EP 6.0 SP2 Patch 4 HF 6 on an Aix 5.2 unix platform. We would like to create our own authentication scheme that uses a login module written in Java that does kerberos authentication externally. From reading the Portal Security Guide it appears that this is a doable approach. Has anyone actually done this with the portal on a unix platform? Which Java kerberos library implementation did you use?
    Thanks in advance.
    Sincerely,
    Steven McElwee, Duke University

    Hi,
    as mentioned above, you need a second server. This one could be Windows. People use this architecture in productive environments.
    If this does not work for you, you need to go the second approach: Custom JAAS login module using the WebCallback plus a kerberos library.
    Here some links:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-1/pluggable authentication implementing a jaas login module presentation
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-1/pluggable authentication implementing a jaas login module exercises
    Best regards,
    Oliver

  • Error Event ID 11 The KDC encountered duplicate names while processing a Kerberos authentication request.

    I've been noticing The Error with event ID 11 popping up a lot on our domain controllers:
    The KDC encountered duplicate names while processing a Kerberos authentication request.
    When running setspn -X it says that it found 111 groups of duplicate SPNs. However, when going through the list, it references domain service accounts that are used to run our SQL Server services. We have about 50 remote locations and each of them has 3
    machines participating in a SQL mirror (principal, mirror, witness) and they all run the SQL Server service on the same account (1 account per location).
    We haven't experienced any issues at all but I was wondering if this could cause problems or if we are straying from best practice. Any advice is welcome. Thanks!

    I believe what you should do to follow best practice is to provide unique SPNs for each SQL server, which will also provide increased security, and to do that you must create individual service account for each SQL server so it can associate that
    account with that server's SPN.
    Here's more on it to help guide you. Read Paul's comments, as well as other suggestions in the following thread:
    event ID 11 There are multiple accounts with name MSSQLSvc/xxxxxx
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/8df35316-23ba-48ba-aa3e-2249fcbfecbc/event-id-11-there-are-multiple-accounts-with-name-mssqlsvcxxxxxx?forum=winserverDS
    Ace Fekay
    MVP, MCT, MCSE 2012, MCITP EA & MCTS Windows 2008/R2, Exchange 2013, 2010 EA & 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
    Microsoft Certified Trainer
    Microsoft MVP - Directory Services
    Complete List of Technical Blogs: http://www.delawarecountycomputerconsulting.com/technicalblogs.php
    This posting is provided AS-IS with no warranties or guarantees and confers no rights.

  • Windowns dll file for Kerberos Authentication

    Hi,
    I am implementing Kerberos Authentication with Windows x64. The SAP Post installation guide metions that gx64krb5.dll file needs to copied under <Drive>:\%windir%\system32. It also metions that the file need to be downloaded from SAP Note 352295,.But "An SAP note with the number requested could not be found". Any other place from where I can download the file.
    Regards
    Deb

    Okay, I found my PDF copy of [Note 352295|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=352295], and it contains the links to download the files from sapnet for both 64 and 32 bit.
    Here is the link for the 64 bit:
    https://service.sap.com/~sapidb/012003146900000310652008E/win64sso.zip
    And just in case anyone reading this thread needs to get to the 32 bit:
    https://service.sap.com/~sapidb/012003146900000310642008E/win32sso.zip

  • Kerberos authentication with Active Directory

    I have tried using JAAS to authenticate to MS Active Directory and keep getting "javax.security.auth.login.LoginException: Pre-Authentication Information was invalid"
    I have tried authenticating with multiple user accounts and on three different realms (Active Directory domains).
    How do I need to format the username? I know that when using JNDI to access Active Directory I have to use the format "[email protected]" or the RDN. I have tried it both ways with JAAS kerberos authentication as well as with just the username by itself. I don't think that the username format is the problem though because if I set the account lockout policy to 5 failed attempts, sure enough my account will be locked out after running my code 5 times. If I give a username that doesn't exist in Active Directory I get the error "javax.security.auth.login.loginexception: Client not found in Kerberos database" Is there something special that I have to do to the password?
    I know that there is just something stupid that I'm missing. Here is the simplest example of code that I'm working with:
    import java.io.*;
    import javax.security.auth.callback.*;
    import javax.security.auth.login.*;
    import javax.security.auth.Subject;
    import com.sun.security.auth.callback.TextCallbackHandler;
    public class krb5ADLogin1 {
    public static void main(String[] args){
    LoginContext lc = null;
    try {
    lc=new LoginContext("krb5ADLogin1", new TextCallbackHandler());
    lc.login();
    catch(Exception e){
    e.printStackTrace();
    Here is my config file:
    krb5ADLogin1 {
    com.sun.security.auth.module.Krb5LoginModule required;
    The command I use to start the program is:
    java -Djava.security.krb5.realm=mydomain.com
    -Djava.security.krb5.kdc=DomainController.mydomain.com
    -Djava.security.auth.login.config=sample.conf krb5ADLogin1

    Hi there ... the Sun web site has the following snippet:
    http://java.sun.com/j2se/1.4/docs/guide/security/jgss/tutorials/Troubleshooting.html
    + javax.security.auth.login.LoginException: KrbException::
    Pre-authentication information was invalid (24) - Preauthentication failed
    Cause 1: The password entered is incorrect.
    Solution 1: Verify the password.
    Cause 2: If you are using the keytab to get the key (e.g., by
    setting the useKeyTab option to true in the Krb5LoginModule entry
    in the JAAS login configuration file), then the key might have
    changed since you updated the keytab.
    Solution 2: Consult your Kerberos documentation to generate a new
    keytab and use that keytab.
    Cause 3: Clock skew - If the time on the KDC and on the client
    differ significanlty (typically 5 minutes), this error can be
    returned.
    Solution 3: Synchronize the clocks (or have a system administrator
    do so).
    Good luck,
    -Derek

  • Remote PowerShell Connection to Lync Server With Kerberos authentication Fails

    Hi everyone ,
    Remote PowerShell to Lync Server With Kerberos authentication Fails .. Is there any reason for not being able to connect when authentication specified as Kerberos . But exactly same code works when Authentication is specified as "Negotiate"
    E.g :
    Error -
    $session=New-PSSession -ConfigurationName Microsoft.Powershell -ConnectionUri https://serverName.lync.com/ocspowershell/ -Credential $cred -Authentication Kerberos
    [serverName.lync.com] Connecting to remote server failed with the following error message : The WinRM client cannot process the request. The authentication mechanism requested by the client is not supported by the server or unencrypted traffic is disabled in
    the service configuration. Verify the unencrypted traffic setting in the service configuration or specify one of the authentication mechanisms supported by the server.  To use Kerberos, specify the computer name as the remote destination. Also verify
    that the client computer and the destination computer are joined to a domain.To use Basic, specify the computer name as the remote destination, specify Basic authentication and provide user name and password. Possible authentication mechanisms reported by
    server:   Digest Negotiate For more information, see the about_Remote_Troubleshooting Help topic.
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
       eption
        + FullyQualifiedErrorId : PSSessionOpenFailed
    Works  -
    $session=New-PSSession -ConfigurationName Microsoft.Powershell -ConnectionUri https://serverName.lync.com/ocspowershell/ -Credential $cred -Authentication Negotiate

    Hi,
    Please double check if Windows Update is the latest version, if not, please update and then test again.
    Please also ensure that the workstation you are using has network access to the Certificate Authority that signed the certificate.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • Server log having multiple Kerberos Authentication failed events

    I my windows server log i  can see so many Kerberos Authentication failure Events, Could you please explain why this is happening and how to resolve this?

    Hello Friend,
    here is the log
    Time of Day
    Name
    Source Country
    Destination IP
    Destination Country
    Destination Port
    Event Count
    2014-12-10 09
    4624: An Account Was Successfully Logged On
    N/A
    0.0.0.0
    N/A
    Not Reported
    2
    2014-12-10 08
    4624: An Account Was Successfully Logged On
    N/A
    0.0.0.0
    N/A
    Not Reported
    6
    2014-12-10 08
    4768: A Kerberos Authentication Ticket (tgt) Was Requested
    N/A
    Not Reported
    N/A
    Not Reported
    2
    2014-12-10 08
    4771: Kerberos Pre-authentication Failed
    N/A
    Not Reported
    N/A
    Not Reported
    2
    2014-12-10 07
    4624: An Account Was Successfully Logged On
    N/A
    0.0.0.0
    N/A
    Not Reported
    14
    2014-12-10 07
    4768: A Kerberos Authentication Ticket (tgt) Was Requested
    N/A
    Not Reported
    N/A
    Not Reported
    1
    2014-12-10 06
    4624: An Account Was Successfully Logged On
    N/A
    0.0.0.0
    N/A
    Not Reported
    12
    2014-12-10 06
    4768: A Kerberos Authentication Ticket (tgt) Was Requested
    N/A
    Not Reported
    N/A
    Not Reported
    2
    2014-12-10 05
    4624: An Account Was Successfully Logged On
    N/A
    0.0.0.0
    N/A
    Not Reported
    16
    2014-12-10 05
    4768: A Kerberos Authentication Ticket (tgt) Was Requested
    N/A
    Not Reported
    N/A
    Not Reported
    1
    2014-12-10 04
    4624: An Account Was Successfully Logged On
    N/A
    0.0.0.0
    N/A
    Not Reported
    22
    2014-12-10 03
    4624: An Account Was Successfully Logged On
    N/A
    0.0.0.0
    N/A
    Not Reported
    8
    2014-12-10 03
    4768: A Kerberos Authentication Ticket (tgt) Was Requested
    N/A
    Not Reported
    N/A
    Not Reported
    1
    2014-12-10 02
    4624: An Account Was Successfully Logged On
    N/A
    0.0.0.0
    N/A
    Not Reported
    11
    2014-12-10 02
    4768: A Kerberos Authentication Ticket (tgt) Was Requested
    N/A
    Not Reported
    N/A
    Not Reported
    4

Maybe you are looking for

  • Docked X60 - Dual Monitor question

    Hi All ! I have an X60 docked on an X6 Ultrabase...I'd like to run a couple of HP 1740 TFT monitors off the laptop (without the integrated screen operational) in the usual FN + F7 fashion. I thought I might be able to use one of these to split the ou

  • ETO - MTO scenario

    We have an ETO scenario where we have a Sales Order assigned to a WBS element. Project creates MRP for material procurement and assembly. So all the purchased components are account-assigned to the Project and the project creates Producttion Order fo

  • As a Seller, how can I hold a payment until customer information is verified?

    Hello, I am going to be taking payments from students for software online. I only want to sell to students and need to verify their information before processing their payment. My current order process has me taking payment and the information at the

  • How to mapped CO2 in the process

    Dear Master, In the Beer manufacturing process Co2 is produced ( it is taken as byproduct ) & that co2 is used for filling cylinder in Keg.But the amount of CO2 produced is less so it is procured from other vendor to fulfill the requirement. Please e

  • Startup - System Error

    Today, wehn I switched ON my mobile, it took longer than usual but when it finally loaded it gave this: 'System Error'. The device works fine though. Firstly, somebody help me by explaining what that is and why did it occur. Secondly, how can I corre