Merge pull request #823 from andir/ldap

ldap: Use hashed passwords in the test
This commit is contained in:
Eelco Dolstra 2020-10-13 12:37:16 +02:00 committed by GitHub
commit 869671e556
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 9 deletions

View file

@ -52,16 +52,16 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1599903709, "lastModified": 1602230526,
"narHash": "sha256-tinVKY7zRdSXmVOp7BAulNtIb2iP5nvNp5UAxihKXNI=", "narHash": "sha256-3/ucBPYg42P+1ji5/7q227Ek/Eq2C7zeiB9sZl5UpIY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "252bfe0107587d40092057f338e9ffcf7bbd90cb", "rev": "0b8799ecaaf0dc6b4c11583a3c96ca5b40fcfdfb",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",
"ref": "nixos-20.03", "ref": "nixos-20.09",
"type": "indirect" "type": "indirect"
} }
}, },

View file

@ -1,7 +1,7 @@
{ {
description = "A Nix-based continuous build system"; description = "A Nix-based continuous build system";
inputs.nixpkgs.url = "nixpkgs/nixos-20.03"; inputs.nixpkgs.url = "nixpkgs/nixos-20.09";
outputs = { self, nixpkgs, nix }: outputs = { self, nixpkgs, nix }:
let let
@ -162,7 +162,7 @@
buildInputs = buildInputs =
[ makeWrapper autoconf automake libtool unzip nukeReferences pkgconfig libpqxx [ makeWrapper autoconf automake libtool unzip nukeReferences pkgconfig libpqxx
gitAndTools.topGit mercurial darcs subversion bazaar openssl bzip2 libxslt gitAndTools.topGit mercurial darcs subversion breezy openssl bzip2 libxslt
perlDeps perl final.nix perlDeps perl final.nix
boost boost
postgresql_11 postgresql_11
@ -177,7 +177,7 @@
hydraPath = lib.makeBinPath ( hydraPath = lib.makeBinPath (
[ subversion openssh final.nix coreutils findutils pixz [ subversion openssh final.nix coreutils findutils pixz
gzip bzip2 lzma gnutar unzip git gitAndTools.topGit mercurial darcs gnused bazaar gzip bzip2 lzma gnutar unzip git gitAndTools.topGit mercurial darcs gnused breezy
] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ] ); ] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ] );
configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ]; configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ];
@ -202,6 +202,8 @@
preCheck = '' preCheck = ''
patchShebangs . patchShebangs .
export LOGNAME=''${LOGNAME:-foo} export LOGNAME=''${LOGNAME:-foo}
# set $HOME for bzr so it can create its trace file
export HOME=$(mktemp -d)
''; '';
postInstall = '' postInstall = ''
@ -364,9 +366,14 @@
rootpw = "notapassword"; rootpw = "notapassword";
database = "bdb"; database = "bdb";
dataDir = "/var/lib/openldap"; dataDir = "/var/lib/openldap";
extraConfig = ''
moduleload pw-sha2
'';
extraDatabaseConfig = '' extraDatabaseConfig = ''
''; '';
# userPassword generated via `slappasswd -o module-load=pw-sha2 -h '{SSHA256}'`
# The admin user has the password `password and `user` has the password `foobar`.
declarativeContents = '' declarativeContents = ''
dn: dc=example dn: dc=example
dc: example dc: example
@ -399,7 +406,7 @@
sn: user sn: user
cn: user cn: user
mail: user@example mail: user@example
userPassword: foobar userPassword: {SSHA256}B9rfUbNgv8nIGn1Hm5qbVQdv6AIQb012ORJwegqELB0DWCzoMCY+4A==
dn: cn=admin,ou=users,dc=example dn: cn=admin,ou=users,dc=example
objectClass: organizationalPerson objectClass: organizationalPerson
@ -407,7 +414,7 @@
sn: admin sn: admin
cn: admin cn: admin
mail: admin@example mail: admin@example
userPassword: password userPassword: {SSHA256}meKP7fSWhkzXFC1f8RWRb8V8ssmN/VQJp7xJrUFFcNUDuwP1PbitMg==
''; '';
}; };
systemd.services.hdyra-server.environment.CATALYST_DEBUG = "1"; systemd.services.hdyra-server.environment.CATALYST_DEBUG = "1";