[
https://issues.apache.org/jira/browse/DISPATCH-2078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17331602#comment-17331602
]
Jiri Daněk commented on DISPATCH-2078:
--------------------------------------
Transforming the Dockerfile for Ubuntu (which runs fine in Docker) into a GHA
script did not help, same problem in the GHA environment.
I added extra sasl logging to Proton and ran that in GitHub Actions environment
{code}
>From 877a299e64860da679138bcdac8ab3eb64935162 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= <[email protected]>
Date: Sun, 25 Apr 2021 10:20:09 +0200
Subject: [PATCH] put in logging
---
c/src/sasl/cyrus_sasl.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/c/src/sasl/cyrus_sasl.c b/c/src/sasl/cyrus_sasl.c
index 6b34eaa1..dc86a730 100644
--- a/c/src/sasl/cyrus_sasl.c
+++ b/c/src/sasl/cyrus_sasl.c
@@ -180,6 +180,7 @@ static int pni_authorize(sasl_conn_t *conn,
const char *def_realm, unsigned urlen,
struct propctx *propctx)
{
+ printf("pni_authorize: \n");
PN_LOG_DEFAULT(PN_SUBSYSTEM_SASL, PN_LEVEL_TRACE, "Authorized: userid=%*s by
authuser=%*s @ %*s",
rlen, requested_user,
alen, auth_identity,
@@ -187,8 +188,16 @@ static int pni_authorize(sasl_conn_t *conn,
return SASL_OK;
}
+int pn_sasl_logging_cb(void *context,
+ int level,
+ const char *message) {
+ printf("pn_sasl_logging_cb: %s\n", message);
+ return SASL_OK;
+}
+
static const sasl_callback_t pni_server_callbacks[] = {
{SASL_CB_PROXY_POLICY, (int(*)(void)) pni_authorize, NULL},
+ {SASL_CB_LOG, (int(*)(void)) pn_sasl_logging_cb, NULL},
{SASL_CB_LIST_END, NULL, NULL},
};
--
2.29.2
{code}
With the Ubuntu cyrus-sasl package, after swapping Proton main for the patched
version, I was getting in the logs from the {{authservice.py}} script
{noformat}
pn_sasl_logging_cb: Password verification failed
{noformat}
I tried setting fqdn in sasldb, but that did not help with the problem. I also
tried configuring sasl log_level to 7 but it seemed that the number in the
config does not have any effect on the messages produced.
When I compiled my own cyrus-sasl, that was able to use SCRAM-SHA-1, I got this
error instead:
{noformat}
pn_sasl_logging_cb: unable to canonify user and get auxprops
{noformat}
and then I set the fqdn when creating sasldb, and the error went away and test
passed.
> system_tests_authz_service_plugin mysteriously broken on GitHub Actions CI
> --------------------------------------------------------------------------
>
> Key: DISPATCH-2078
> URL: https://issues.apache.org/jira/browse/DISPATCH-2078
> Project: Qpid Dispatch
> Issue Type: Test
> Affects Versions: 1.16.0
> Reporter: Jiri Daněk
> Assignee: Jiri Daněk
> Priority: Major
>
> https://github.com/apache/qpid-dispatch/runs/2426474351#step:9:2155
> {noformat}
> 43: <<<<
> 43: test_authorized
> (system_tests_authz_service_plugin.AuthServicePluginAuthzTest) ... FAIL
> 43: test_dynamic_source_anonymous_sender
> (system_tests_authz_service_plugin.AuthServicePluginAuthzTest) ... FAIL
> 43: test_unauthorized
> (system_tests_authz_service_plugin.AuthServicePluginAuthzTest) ... FAIL
> 43: test_unauthorized_anonymous_sender_target
> (system_tests_authz_service_plugin.AuthServicePluginAuthzTest) ... FAIL
> 43: test_wildcard
> (system_tests_authz_service_plugin.AuthServicePluginAuthzTest) ... FAIL
> 43:
> 43: Router router output file:
> 43: >>>>
> 43: 2021-04-24 11:12:31.013358 +0000 AGENT (warning) Attribute
> 'saslConfigPath' of entity 'router' has been deprecated. Use 'saslConfigDir'
> instead
> 43: -----------------------------------------------------
> 43: Suppressions used:
> 43: count bytes template
> 43: 1 7 ^load_server_config$
> 43: 1 32 ^qd_policy_c_counts_alloc$
> 43: 1 56 qdr_core_subscribe
> 43: 12 6656 ^_PyObject_Realloc
> 43: 550 870562 ^PyObject_Malloc$
> 43: 1 32 ^PyThread_allocate_lock$
> 43: 4 9897 ^PyMem_Malloc$
> 43: 1 856 ^_PyObject_GC_Resize$
> 43: -----------------------------------------------------
> 43:
> 43:
> 43: <<<<
> 43:
> 43: ======================================================================
> 43: FAIL: test_authorized
> (system_tests_authz_service_plugin.AuthServicePluginAuthzDeprecatedTest)
> 43: ----------------------------------------------------------------------
> 43: Traceback (most recent call last):
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_test.py",
> line 924, in wrap
> 43: return f(*args, **kwargs)
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_tests_authz_service_plugin.py",
> line 97, in test_authorized
> 43: self.assertEqual(1, client.sent)
> 43: AssertionError: 1 != 0
> 43:
> 43: ======================================================================
> 43: FAIL: test_dynamic_source_anonymous_sender
> (system_tests_authz_service_plugin.AuthServicePluginAuthzDeprecatedTest)
> 43: ----------------------------------------------------------------------
> 43: Traceback (most recent call last):
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_test.py",
> line 924, in wrap
> 43: return f(*args, **kwargs)
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_tests_authz_service_plugin.py",
> line 129, in test_dynamic_source_anonymous_sender
> 43: self.assertEqual(1, client.accepted)
> 43: AssertionError: 1 != 0
> 43:
> 43: ======================================================================
> 43: FAIL: test_unauthorized
> (system_tests_authz_service_plugin.AuthServicePluginAuthzDeprecatedTest)
> 43: ----------------------------------------------------------------------
> 43: Traceback (most recent call last):
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_test.py",
> line 924, in wrap
> 43: return f(*args, **kwargs)
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_tests_authz_service_plugin.py",
> line 109, in test_unauthorized
> 43: self.assertEqual(2, len(client.errors))
> 43: AssertionError: 2 != 0
> 43:
> 43: ======================================================================
> 43: FAIL: test_unauthorized_anonymous_sender_target
> (system_tests_authz_service_plugin.AuthServicePluginAuthzDeprecatedTest)
> 43: ----------------------------------------------------------------------
> 43: Traceback (most recent call last):
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_test.py",
> line 924, in wrap
> 43: return f(*args, **kwargs)
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_tests_authz_service_plugin.py",
> line 140, in test_unauthorized_anonymous_sender_target
> 43: self.assertEqual(1, client.rejected)
> 43: AssertionError: 1 != 0
> 43:
> 43: ======================================================================
> 43: FAIL: test_wildcard
> (system_tests_authz_service_plugin.AuthServicePluginAuthzDeprecatedTest)
> 43: ----------------------------------------------------------------------
> 43: Traceback (most recent call last):
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_test.py",
> line 924, in wrap
> 43: return f(*args, **kwargs)
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_tests_authz_service_plugin.py",
> line 119, in test_wildcard
> 43: self.assertEqual(1, client.sent)
> 43: AssertionError: 1 != 0
> 43:
> 43: ======================================================================
> 43: FAIL: test_authorized
> (system_tests_authz_service_plugin.AuthServicePluginAuthzTest)
> 43: ----------------------------------------------------------------------
> 43: Traceback (most recent call last):
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_test.py",
> line 924, in wrap
> 43: return f(*args, **kwargs)
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_tests_authz_service_plugin.py",
> line 97, in test_authorized
> 43: self.assertEqual(1, client.sent)
> 43: AssertionError: 1 != 0
> 43:
> 43: ======================================================================
> 43: FAIL: test_dynamic_source_anonymous_sender
> (system_tests_authz_service_plugin.AuthServicePluginAuthzTest)
> 43: ----------------------------------------------------------------------
> 43: Traceback (most recent call last):
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_test.py",
> line 924, in wrap
> 43: return f(*args, **kwargs)
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_tests_authz_service_plugin.py",
> line 129, in test_dynamic_source_anonymous_sender
> 43: self.assertEqual(1, client.accepted)
> 43: AssertionError: 1 != 0
> 43:
> 43: ======================================================================
> 43: FAIL: test_unauthorized
> (system_tests_authz_service_plugin.AuthServicePluginAuthzTest)
> 43: ----------------------------------------------------------------------
> 43: Traceback (most recent call last):
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_test.py",
> line 924, in wrap
> 43: return f(*args, **kwargs)
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_tests_authz_service_plugin.py",
> line 109, in test_unauthorized
> 43: self.assertEqual(2, len(client.errors))
> 43: AssertionError: 2 != 0
> 43:
> 43: ======================================================================
> 43: FAIL: test_unauthorized_anonymous_sender_target
> (system_tests_authz_service_plugin.AuthServicePluginAuthzTest)
> 43: ----------------------------------------------------------------------
> 43: Traceback (most recent call last):
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_test.py",
> line 924, in wrap
> 43: return f(*args, **kwargs)
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_tests_authz_service_plugin.py",
> line 140, in test_unauthorized_anonymous_sender_target
> 43: self.assertEqual(1, client.rejected)
> 43: AssertionError: 1 != 0
> 43:
> 43: ======================================================================
> 43: FAIL: test_wildcard
> (system_tests_authz_service_plugin.AuthServicePluginAuthzTest)
> 43: ----------------------------------------------------------------------
> 43: Traceback (most recent call last):
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_test.py",
> line 924, in wrap
> 43: return f(*args, **kwargs)
> 43: File
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_tests_authz_service_plugin.py",
> line 119, in test_wildcard
> 43: self.assertEqual(1, client.sent)
> 43: AssertionError: 1 != 0
> 43:
> 43: ----------------------------------------------------------------------
> 43: Ran 10 tests in 1.552s
> 43:
> 43: FAILED (failures=10)
> 21/38 Test #43: system_tests_authz_service_plugin ..............***Failed
> 1.67 sec
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]