theforeman / puppet-pulp

Puppet module for setting up Pulp 2 as part of Katello installation
GNU General Public License v3.0
16 stars 66 forks source link

Pulp::Admin::Login/Exec[pulp-auth] doesn't seem to handle expired session? #323

Open TJM opened 6 years ago

TJM commented 6 years ago

Apparently when pulp::admin::login runs, it gets a "session" certificate for some time limited period, but doesn't check whether it has expired or not, causing further steps to get an exception as follows:

Error: Failed to apply catalog: https request threw exception SSL_connect returned=1 errno=0 state=unknown state: sslv3 alert certificate expired. Connection details: url=https://pulp.domain.corp/pulp/api/v2/repositories/, cert_path=/root/.pulp/user-cert.pem.
sentinel159868 commented 6 years ago

Same issue here..... any workarounds to handle it?

TJM commented 6 years ago

As a workaround, you could remove the file (/root/.pulp/user-cert.pem), which will cause the login process to run again, that will work until the session times out again. :)

It might be worth augmenting the login class to create a /root/.pulp/admin.conf with the credentials?

Looks like its already there, just have to set pulp::admin::login_method: file (strike that, it looks like login_method is set in code. https://github.com/theforeman/puppet-pulp/blob/74deb20820c43e973f6591160c3b4212d5eaa280/manifests/init.pp#L436-L457

I suppose you could set pulp::enable_admin: false and then include pulp::admin with login_method set to files, but it claims there that setting will break the providers :(