I am finally - damn it, never enough time for fun stuff - trying to implement what you are suggesting.
I have set up 2 privacyidea (self signed certificates) and accomodate /etc/hosts so the conveniently respond to:
https://pi-ldap
https://pi-ad
I register https://pi-ad as a remote privacyidea server in https://pi-ldap and while testing the connection I bump into error 400:
[2022-01-14 11:37:21,904][490][140425708930816][DEBUG][privacyidea.lib.policy:526] Policies after matching active: []
[2022-01-14 11:37:21,905][490][140425708930816][DEBUG][privacyidea.lib.policy:526] Policies after matching scope: []
[2022-01-14 11:37:21,905][490][140425708930816][DEBUG][privacyidea.lib.policy:551] Policies after matching action: []
[2022-01-14 11:37:21,905][490][140425708930816][DEBUG][privacyidea.lib.policy:551] Policies after matching adminrealm: []
[2022-01-14 11:37:21,905][490][140425708930816][DEBUG][privacyidea.lib.policy:551] Policies after matching adminuser: []
[2022-01-14 11:37:21,906][490][140425708930816][DEBUG][privacyidea.lib.policy:617] Policies after matching client: []
[2022-01-14 11:37:21,906][490][140425708930816][DEBUG][privacyidea.lib.policy:198] Exiting list_policies with result []
[2022-01-14 11:37:21,906][490][140425708930816][DEBUG][privacyidea.lib.policy:683] Policies after matching time: []
[2022-01-14 11:37:21,907][490][140425708930816][DEBUG][privacyidea.lib.policy:688] Policies after matching conditions
[2022-01-14 11:37:21,907][490][140425708930816][DEBUG][privacyidea.lib.policy:186] Entering list_policies with arguments (<privacyidea.lib.policy.PolicyClass object at 0x7fb7527cb810>,) and keywords {'active': True, 'scope': u'admin'}
[2022-01-14 11:37:21,909][490][140425708930816][DEBUG][privacyidea.lib.policy:526] Policies after matching active: []
[2022-01-14 11:37:21,909][490][140425708930816][DEBUG][privacyidea.lib.policy:526] Policies after matching scope: []
[2022-01-14 11:37:21,910][490][140425708930816][DEBUG][privacyidea.lib.policy:198] Exiting list_policies with result []
[2022-01-14 11:37:21,910][490][140425708930816][DEBUG][privacyidea.api.privacyideaserver:186] Entering test with arguments () and keywords {}
[2022-01-14 11:37:24,778][490][140425708930816][DEBUG][privacyidea.lib.privacyideaserver:75] Sent request to privacyIDEA server. status code returned: 400
[2022-01-14 11:37:24,779][490][140425708930816][WARNING][privacyidea.lib.privacyideaserver:79] The request to the remote privacyIDEA server https://pi-ad returned a status code: 400
[2022-01-14 11:37:24,779][490][140425708930816][DEBUG][privacyidea.lib.auditmodules.base:186] Entering log with arguments (<privacyidea.lib.auditmodules.sqlaudit.Audit object at 0x7fb75267b9d0>, {'info': False, 'success': False}) and keywords {}
[2022-01-14 11:37:24,780][490][140425708930816][DEBUG][privacyidea.lib.auditmodules.base:198] Exiting log with result None
[2022-01-14 11:37:24,782][490][140425708930816][DEBUG][privacyidea.api.privacyideaserver:198] Exiting test with result <PiResponseClass 143 bytes [200 OK]>
[2022-01-14 11:37:24,805][490][140425708930816][DEBUG][privacyidea.api.before_after:90] End handling of request u'/privacyideaserver/test_request?'
I cannot enroll any remote tokentype (the option is not even present) as probably the remote server is not considered sound.
I can successfully:
telnet https:://pi-ad 443
curl -k https:://pi-ad
from my https://pi-ldap instance
my version is 3.3.1. Do you have any suggestion on how to solve this?