Closed eashleyfl closed 1 year ago
The secret as generated by IPA cannot include special characters because of the way the password generator is called.
https://github.com/freeipa/freeipa/blob/master/ipaserver/install/dogtaginstance.py#L409
Was this secret set manually?
I have a vague recollection of being prompted for a password but don't seem to have relevant logs for it. I always use a password generator when prompted for a password. So yes, I believe it was set manually.
Was this secret set manually?
------- Original Message ------- On Monday, March 27th, 2023 at 5:49 PM, Rob Crittenden @.***> wrote:
The secret as generated by IPA cannot include special characters because of the way the password generator is called.
https://github.com/freeipa/freeipa/blob/master/ipaserver/install/dogtaginstance.py#L409
Was this secret set manually?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.
This password is not prompted for.
As far as I can tell even if the CA generates the secret it is all characters & numbers:
The charset is defined at https://github.com/dogtagpki/pki/blob/master/base/server/python/pki/server/deployment/pkiparser.py#L275 and used at https://github.com/dogtagpki/pki/blob/master/base/server/python/pki/server/deployment/pkiparser.py#L288 which is a subset of \w (which is [a-zA-Z0-9_])
Is the length of yours 44 characters? That's the length IPA generates.
I must have changed it when I first installed the KRA server.
Issue
If the AJP secret contains any special characters, the regex expression at
freeipa-healthcheck/src/ipahealthcheck/ipa/proxy.py:89
fails to recognize the secret correctly. If the first character is a special character, it reports no secret is specified.PROXY_RE = r'\s+ProxyPassMatch ajp://localhost:8009 secret=(\w+)$'
Actual behavior
ipa-healthcheck reports like the following, even though the secret exists and is properly configured everywhere:
The word match expression for
'secret=(\w+)$'
will stop at any special character. If the first character is a special character, it reads as no secret specified. This needs to use a better regex expression since special characters are likely to be in any modern secret.Expected behavior
It should not report any error
Version/Release/Distribution