[freeipa PR#1447][opened] Custom ca-subject logging
by amitkumar50
URL: https://github.com/freeipa/freeipa/pull/1447
Author: amitkumar50
Title: #1447: Custom ca-subject logging
Action: opened
PR body:
"""
Present Situation:
Logging is a bit incomplete when using a custom CA subject passed in via --ca-subject.
If there is a problem finding the IPA CA certificate then the installer will log:
>ERROR IPA CA certificate not found in /tmp/servercert.pem, /tmp/cacert.pem
After the Fix this sort of log is seen:
>ipa.ipapython.install.cli.install_tool(Server): DEBUG The ipa-server-install command failed, exception: ScriptError:
>IPA CA certificate not found in /root/ipa.cert, /root/rootCA.crt.
>Wrong CA Certificate File found
>CA certificate subject 'CN=testers,OU=Hong Kong CA Org,O=Hong Kong CA,L=Hong Kong,ST=BRazial,C=US'
Resolves: https://pagure.io/freeipa/issue/7245
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/1447/head:pr1447
git checkout pr1447
5 years, 2 months
Testing extdom plugin directly
by Sumit Bose
Hi,
please find attached a small python class (generated with asn1ate) which
might help to generate the needed data to send a request to the extdom
plugin directly. This might be useful to write tests.
To generate the base64 encoded data needed e.g. for the ldapexop command
I used:
from pyasn1.codec.der.encoder import encode as der_encoder
from base64 import b64encode
from pyasn1.codec.native.decoder import decode
from s2n_req import ExtdomRequestValue
ad_user = 'aduser'
ad_domain = 'ad.domain'
request_type = 'full'
name = { 'domainname' : ad_domain, 'objectname' : ad_user }
data = { 'name' : name }
r = { 'inputType' : 'name' , 'requestType' : request_type, 'data' : data }
req = decode(r, asn1Spec=ExtdomRequestValue())
der_serialisation = der_encoder(req)
print b64encode(der_serialisation)
(sorry for the bad python)
$ python my_req.py
MBsKAQIKAQIwEwQJYWQuZG9tYWluBAZhZHVzZXI=
Now you can send the request to the extdom plugin by calling:
ldapexop -x 2.16.840.1.113730.3.8.10.4.1::MBsKAQIKAQIwEwQJYWQuZG9tYWluBAZhZHVzZXI=
If the user was found ldapexop will return a base64 encoded reply. So
far using e.g. dumpasn1 was sufficient for me to look at the reply
because I mainly used the requests to generate load for the extdom
plugin and didn't cared much about the reply. But if I'll find some time
I might add a class to decode the reply properly later.
HTH
bye,
Sumit
5 years, 2 months