4d970d5fc4
Authentication is performed by binding to the configured LDAP server using the user supplied credentials. Successfull bind equals authenticated user. Optionally the connector can be configured to search before authentication. The entryDN found will be used to bind to the LDAP server. This feature must be enabled to get supplementary information from the directory (ID, Name, Email). This feature can also be used to limit access to the service. Example use case: Allow your users to log in with e-mail address instead of the identification string in your DNs (typically username). To make re-use of HTTP form handling code from the Local connector possible: - Implemented IdentityProvider interface - Moved the re-used functions to login_local.go Fixes #119
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
sudo: required
|
|
services:
|
|
- docker
|
|
|
|
language: go
|
|
|
|
go:
|
|
- 1.4.3
|
|
- 1.5.3
|
|
|
|
env:
|
|
- DEX_TEST_DSN="postgres://postgres@127.0.0.1:15432/postgres?sslmode=disable" ISOLATED=true
|
|
DEX_TEST_LDAP_URI="ldap://tlstest.local:1389/????bindname=cn%3Dadmin%2Cdc%3Dexample%2Cdc%3Dorg,X-BINDPW=admin"
|
|
|
|
install:
|
|
- go get golang.org/x/tools/cmd/cover
|
|
- go get golang.org/x/tools/cmd/vet
|
|
- docker pull quay.io/coreos/postgres
|
|
- docker pull osixia/openldap
|
|
|
|
script:
|
|
- docker run -d -p 127.0.0.1:15432:5432 quay.io/coreos/postgres
|
|
- LDAPCONTAINER=`docker run -e LDAP_TLS_PROTOCOL_MIN=3.0 -e LDAP_TLS_CIPHER_SUITE=NORMAL -d -p 127.0.0.1:1389:389 -p 127.0.0.1:1636:636 -h tlstest.local osixia/openldap`
|
|
- ./test
|
|
- docker cp ${LDAPCONTAINER}:container/service/:cfssl/assets/default-ca/default-ca.pem /tmp/openldap-ca.pem
|
|
- docker cp ${LDAPCONTAINER}:container/service/slapd/assets/certs/ldap.key /tmp/ldap.key
|
|
- chmod 644 /tmp/ldap.key
|
|
- docker cp ${LDAPCONTAINER}:container/service/slapd/assets/certs/ldap.crt /tmp/ldap.crt
|
|
- sudo sh -c 'echo "127.0.0.1 tlstest.local" >> /etc/hosts'
|
|
- ./test-functional
|
|
|
|
deploy:
|
|
provider: script
|
|
script: "./build-docker-push"
|
|
skip_cleanup: true
|
|
on:
|
|
branch: master
|
|
go: '1.5.3'
|
|
condition: "$TRAVIS_PULL_REQUEST = false"
|
|
|
|
notifications:
|
|
email: false
|