RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2216532 - RHEL 8.8 & 9.2 fails to create AD trust with STIG applied [NEEDINFO]
Summary: RHEL 8.8 & 9.2 fails to create AD trust with STIG applied
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.8
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Florence Blanc-Renaud
QA Contact: Sudhir Menon
URL:
Whiteboard:
Depends On:
Blocks: 2231847
TreeView+ depends on / blocked
 
Reported: 2023-06-21 17:33 UTC by Mike Ralph
Modified: 2024-01-22 11:24 UTC (History)
12 users (show)

Fixed In Version: ipa-4.9.12-7.module+el8.9.0+19692+fac39a03
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2231847 (view as bug list)
Environment:
Last Closed: 2023-11-14 15:32:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:
frenaud: needinfo? (sumenon)


Attachments (Terms of Use)
log files (62.90 KB, application/gzip)
2023-06-21 17:33 UTC, Mike Ralph
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure freeipa issue 9427 0 None None None 2023-08-14 08:51:32 UTC
Red Hat Issue Tracker FREEIPA-10058 0 None None None 2023-08-11 14:39:26 UTC
Red Hat Issue Tracker RHELPLAN-160385 0 None None None 2023-06-21 17:36:52 UTC
Red Hat Product Errata RHBA-2023:6977 0 None None None 2023-11-14 15:33:31 UTC

Description Mike Ralph 2023-06-21 17:33:34 UTC
Created attachment 1971942 [details]
log files

Description of problem:
  RHEL 8.8 & 9.2 fails to create AD trust with STIG applied.


Version-Release number of selected component (if applicable):
  RHEL 8.8 and 9.2

How reproducible:
  consistent

Steps to Reproduce:
1. Install OS with DISA STIG security profile
2. Install IdM
3. Create trust
3a. ipa trust-add --type=ad <ad domain>

Actual results:
body: b'{"result": null, "error": {"code": 4016, "message": "CIFS server communication error: code \\"3221225581\\", message \\"The attempted logon is invalid. This is either due to a bad username or authentication information.\\" (both may be \\"None\\")", "data": {"reason": "CIFS server communication error: code \\"3221225581\\", message \\"The attempted logon is invalid. This is either due to a bad username or authentication information.\\" (both may be \\"None\\")"}, "name": "RemoteRetrieveError"}, "id": 0, "principal": "admin.COM", "version": "4.9.11"}'
ipa: INFO: Response: {
    "error": {
        "code": 4016,
        "data": {
            "reason": "CIFS server communication error: code \"3221225581\", message \"The attempted logon is invalid. This is either due to a bad username or authentication information.\" (both may be \"None\")"
        },
        "message": "CIFS server communication error: code \"3221225581\", message \"The attempted logon is invalid. This is either due to a bad username or authentication information.\" (both may be \"None\")",
        "name": "RemoteRetrieveError"
    },
    "id": 0,
    "principal": "admin.COM",
    "result": null,
    "version": "4.9.11"
}
ipa: ERROR: CIFS server communication error: code "3221225581", message "The attempted logon is invalid. This is either due to a bad username or authentication information." (both may be "None")

Expected results:
  Trust is created

Additional info:
DISA STIG applied during OS install and FIPS removed before IdM installation.

Comment 21 Florence Blanc-Renaud 2023-08-11 14:38:04 UTC
Moving back to ipa.

The issue happens because there is an existing sssd.conf file pre-installation, that does not contain [sssd] services=nss, pam
File before installation:
# cat /etc/sssd/sssd.conf
 
[sssd]
domains = default
[domain/default]
id_provider = files
[pam]
pam_cert_auth = True
offline_credentials_expiration = 1


In the usual case, there is no /etc/sssd/sssd.conf file when ipa-server-install is called and the installer creates the file using 
import SSSDConfig
sssdconfig = SSSDConfig.SSSDConfig()
sssdconfig.new_config()

In this case, the new object sssdconfig has some services activated by default:
sssdconfig.list_active_services()
['nss', 'pam']


In the STIG case, there is already a /etc/sssd/sssd.conf file before ipa-server-install is called and the installer goes in a different code path:
import SSSDConfig
sssdconfig = SSSDConfig.SSSDConfig()
sssdconfig.import_config()

The code configure the options for the server but never tries to activate the service, while it should using sssdconfig.activate_service('nss').
Relevant code portion: https://github.com/freeipa/freeipa/blob/a9ee2adec38b23d7d957d503d79e20b2174cc512/ipaclient/install/client.py#L964-L970
        try:
            nss_service = sssdconfig.get_service('nss')
        except SSSDConfig.NoServiceError:
            nss_service = sssdconfig.new_service('nss')

        nss_service.set_option('memcache_timeout', 600)
        sssdconfig.save_service(nss_service)

Comment 22 Florence Blanc-Renaud 2023-08-14 08:51:30 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/9427

Comment 24 Florence Blanc-Renaud 2023-08-16 12:44:50 UTC
Fixed upstream
master:
https://pagure.io/freeipa/c/7796b7b9585e9459bb44b8ea92c50eb2592319cf

Comment 32 errata-xmlrpc 2023-11-14 15:32:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (idm:client and idm:DL1 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6977

Comment 33 Pavel Březina 2024-01-22 11:24:38 UTC
Clearing need info.


Note You need to log in before you can comment on or make changes to this bug.