TheHive-Project / TheHive-Project/Cortex

AD authentication failure / Clarification on AD Authentication

Open
#406 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.6k
Forks
264
PR merge metrics
No merged PRs in 30d

Description

AD authentication failure / Clarification on AD Authentication

Request Type

Bug

Work Environment
Question Answer
OS version (server) CentOS
OS version (client) 7
Cortex version / git hash 3.1.3
Package Type Binary
Problem Description

Describe the problem/bug as clearly as possible.

We are failing to authenticate to Active Directory with the format of user@acme.com.

The same configuration works for thehive, but not for cortex.

https://github.com/TheHive-Project/TheHive/issues/1453 this one may be related

Steps to Reproduce
  1. Setup Cortex and modify the application.conf to use the ad provider.
    provider = [local,ad]
    ad {
    domainName="ACME"
    domainFQDN="acme.local"
    useSSL=true
    hosts=[DC1.acme.local]
    defaultUserDomain: "acme.com"
    }
  2. Try to login and fail miserably
Complementary information

(add anything that can help identifying the problem such as log excerpts, screenshots, configuration dumps etc.)

The error is as follows:
[error] o.e.s.a.ADAuthSrv - AD authentication failure
javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C090447, comment: AcceptSecurityContext error, data 52e, v3839]
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3261)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3207)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2993)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2907)
at com.sun.jndi.ldap.LdapCtx.(LdapCtx.java:347)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxFromUrl(LdapCtxFactory.java:225)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:189)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:243)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:154)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:84)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the AD provider settings in application.conf and the ADAuthSrv failure shown in the JNDI stack trace. Compare how the configured domainName, domainFQDN, hosts, and defaultUserDomain are used for login, then verify authentication with the user@acme.com format succeeds against the supplied Active Directory configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
authentication, backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.