#7145 ca_certfile is not honored on API requests
Closed: fixed 7 years ago Opened 8 years ago by rcritten.

The location of the CA chain can be specified by setting ca_certfile in RPCClient::create_connection. This value is properly saved in the context but when the actual connection is made in SSLTransport the hardcoded value in the API is used instead of the value in the context.

This can be worked around by setting tls_ca_cert in api.bootstrap() but it shouldn't be necessary given the variable is already there.

Also of note if the CA file does not exist then only "Unhandled exception: [Errno 2] No such file or directory" is provided, not what file cannot be found.


The reason I need this is to be able to do IPA operations on a machine that is not enrolled as an IPA client. I create a temporary krb5.conf and bootstrap IPA In such a way that I don't need to be enrolled. To do this I need to fetch the CA chain and pass it into the rpcclient class. This can be done one of two ways:

  • by setting api.env.tls_ca_cert during bootstrap which would affect all subsequent connections which may not be desirable
  • or by actually using the value set when the connection is created as was originally designed

Metadata Update from @pvoborni:
- Issue priority set to: major
- Issue set to the milestone: FreeIPA 4.5.4

8 years ago

Metadata Update from @tkrizek:
- Issue set to the milestone: FreeIPA 4.5.5 (was: FreeIPA 4.5.4)

8 years ago

master:

  • 17bda0b Use the CA chain file from the RPC context
  • e8a26af Add test to ensure that properties are being set in rpcclient
  • 01bfe22 If the cafile is not present or readable then raise an exception

Metadata Update from @rcritten:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

7 years ago

ipa-4-6:

  • 806b76b Use the CA chain file from the RPC context
  • cd0066a Add test to ensure that properties are being set in rpcclient
  • 6273ec6 If the cafile is not present or readable then raise an exception

Log in to comment on this ticket.

Metadata