#2565 Basic auth should not depend on nssdb
Closed: fixed Opened by gkapoor.

when we are doing basic authentication,we need to specify nssdb directory
location.Ideally when we are doing cert authentication.
Basic authentication should be checking only for username/password and nssdb
should be optional.

Steps to Reproduce:

Use cases::

1. basic auth ( passwdUserDBAuthMgrwithout ) -d option
[root@pki1 tps]# pki  -P http -h pki1.example.com -p 25080 -u tpsadmin -w
Secret123  tps-user-find
Error: Certificate database not initialized
2. basic auth with empty nssdb . This means it clearly works without certs
validation.
[root@pki1 tps]# pki  -P http -h pki1.example.com -p 25080 -u tpsadmin -w
Secret123 -d /tmp/test3 tps-token-find
WARNING: UNTRUSTED ISSUER encountered on
'CN=pki1.example.com,OU=topology-02-TPS,O=topology-02_Foobarmaster.org'
indicates a non-trusted CA cert 'CN=CA Signing
Certificate,OU=topology-02-CA,O=topology-02_Foobarmaster.org'
Import CA certificate (Y/n)? n
-----------------
1 entries matched
-----------------
  Token ID: 1000000000000
  Status: UNFORMATTED
  Date Created: Wed Nov 30 07:04:43 EST 2016
----------------------------
Number of entries returned 1
----------------------------

This is a minor usability improvement.

Certain CLI operations such as tps-token-find will get redirected to SSL port even if the request was initially sent to a non-secure port (regardless of basic auth). In that case the CLI will invoke JSS which currently requires an NSS database (e.g. for server cert validation). If JSS can be modified to use NSS_NoDB_Init() the CLI could run without setting up an NSS database. However, if the CLI uses a CA cert, the CA cert still has to be installed in an NSS database anyway.

+1 - Future - minor

Metadata Update from @gkapoor:
- Issue set to the milestone: FUTURE

This issue has been addressed in 10.4.1. The CLI will now create a default NSS database without password in ~/.dogtag/nssdb, so all operations involving SSL can be executed without specifying NSS database directory and password.

Changes in master:

  • 8b85ace2a2761c8451a11b4df8f142bd291cd6d4
  • 4c6a98d79a02fd0bf6e5da56835e8dd0ce2e7485
  • 2c4beb83a1dd772e02f5809e610319fcf1812034
  • 516e9360f96721bdbd0301b12120c9d47225e5e4

The wiki page has been updated as well:
http://pki.fedoraproject.org/wiki/PKI_CLI

Metadata Update from @edewata:
- Custom field feature adjusted to ''
- Custom field proposedmilestone adjusted to ''
- Custom field proposedpriority adjusted to ''
- Custom field reviewer adjusted to ''
- Custom field version adjusted to ''
- Issue close_status updated to: fixed
- Issue set to the milestone: 10.4.1 (was: FUTURE)
- Issue status updated to: Closed (was: Open)

Metadata Update from @mharmsen:
- Issue assigned to edewata

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/2685

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata