jenkinsci / jenkinsci/active-directory-plugin
[JENKINS-36148] The test ignores the custom server if specified.
- Dominant language
- Java
- Stars
- 53
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
If you use a domain that is somehow firewalled from a machine outside (ie the DNS will not resolve the domain name) but specify a server with an ip address then Jenkins will happily authenticate users against this server using the domain specified.
However if you hit the "test" button then you are presented with a big fail...
Whilst the domain may be used if the server is unreachable to locate other servers - this should be a warning - not an error as users are able to correctly authenticate.
AD plugin 1.47
```
Jun 22, 2016 3:37:25 PM WARNING hudson.plugins.active_directory.ActiveDirectorySecurityRealm$DescriptorImpl doValidate
Failed to resolve james.local. to A record
javax.naming.NameNotFoundException: DNS name not found [response code 3]; remaining name 'james.local.'
at com.sun.jndi.dns.DnsClient.checkResponseCode(DnsClient.java:656)
at com.sun.jndi.dns.DnsClient.isMatchResponse(DnsClient.java:574)
at com.sun.jndi.dns.DnsClient.doUdpQuery(DnsClient.java:423)
at com.sun.jndi.dns.DnsClient.query(DnsClient.java:208)
at com.sun.jndi.dns.Resolver.query(Resolver.java:81)
at com.sun.jndi.dns.DnsContext.c_getAttributes(DnsContext.java:434)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:235)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:141)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:129)
at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:142)
at hudson.plugins.active_directory.ActiveDirectorySecurityRealm$DescriptorImpl.doValidate(ActiveDirectorySecurityRealm.java:412)
```
---
Originally reported by
teilo, imported from: The test ignores the custom server if specified.
fbelzunc
Raw content of original issue
If you use a domain that is somehow firewalled from a machine outside (ie the DNS will not resolve the domain name) but specify a server with an ip address then Jenkins will happily authenticate users against this server using the domain specified.
However if you hit the "test" button then you are presented with a big fail...
Whilst the domain may be used if the server is unreachable to locate other servers - this should be a warning - not an error as users are able to correctly authenticate.
AD plugin 1.47
Jun 22, 2016 3:37:25 PM WARNING hudson.plugins.active_directory.ActiveDirectorySecurityRealm$DescriptorImpl doValidate
Failed to resolve james.local. to A record
javax.naming.NameNotFoundException: DNS name not found [response code 3]; remaining name 'james.local.'
at com.sun.jndi.dns.DnsClient.checkResponseCode(DnsClient.java:656)
at com.sun.jndi.dns.DnsClient.isMatchResponse(DnsClient.java:574)
at com.sun.jndi.dns.DnsClient.doUdpQuery(DnsClient.java:423)
at com.sun.jndi.dns.DnsClient.query(DnsClient.java:208)
at com.sun.jndi.dns.Resolver.query(Resolver.java:81)
at com.sun.jndi.dns.DnsContext.c_getAttributes(DnsContext.java:434)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:235)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:141)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:129)
at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:142)
at hudson.plugins.active_directory.ActiveDirectorySecurityRealm$DescriptorImpl.doValidate(ActiveDirectorySecurityRealm.java:412)
1 attachment
- [image-2016-06-22-15-42-30-040.png](https://issues.jenkins.io/secure/attachment/33093/image-2016-06-22-15-42-30-040.png)
> 
Contributor guide
Assessment
This issue has not been assessed yet.