fix (boundary dev): make the LDAP auth method active-public (#3344)

This commit is contained in:
Jim authored and GitHub committed 2023-06-20 13:56:20 -04:00
1 parent 15e7bbe816
commit 723dbdfedf
5 files changed
+35

No files matched your search

+6
View File
@@ -5,3 +5,9 @@ function login() {
export BP="${DEFAULT_PASSWORD}"
boundary authenticate password -auth-method-id $DEFAULT_AMPW -login-name $1 -password env://BP
}
function login_ldap() {
export BP="${DEFAULT_PASSWORD}"
boundary authenticate ldap -auth-method-id $DEFAULT_AMPW -login-name $1 -password env://BP
}
@@ -15,6 +15,8 @@ export DEFAULT_HOST_CATALOG="${DEFAULT_HOST_CATALOG:-hcst_1234567890}"
export DEFAULT_HOST="${DEFAULT_HOST:-hst_1234567890}"
export DEFAULT_USER="${DEFAULT_USER:-u_1234567890}"
export DEFAULT_UNPRIVILEGED_USER="${DEFAULT_UNPRIVILEGED_USER:-u_0987654321}"
export DEFAULT_AMLDAP="${DEFAULT_AMLDAP:-amldap_1234567890}"
function strip() {
echo "$1" | tr -d '"'
@@ -0,0 +1,23 @@
#!/usr/bin/env bats
load _auth
load _helpers
load _auth_tokens
export NEW_USER='test'
@test "boundary/authenticate password: can login as unpriv user" {
run login $DEFAULT_UNPRIVILEGED_LOGIN
[ "$status" -eq 0 ]
run logout_cmd
[ "$status" -eq 0 ]
}
@test "boundary/authenticate ldap: can login as unpriv user" {
run login_ldap $DEFAULT_UNPRIVILEGED_LOGIN
[ "$status" -eq 0 ]
run logout_cmd
[ "$status" -eq 0 ]
}