Bug 2086465 - External identity providers should log login attempts in the audit trail
Summary: External identity providers should log login attempts in the audit trail
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: apiserver-auth
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.11.0
Assignee: Pierre Prinetti
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-16 08:58 UTC by Pierre Prinetti
Modified: 2022-08-10 11:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Include logins mediated by external identity providers to the login audit trail. Reason: Enable the inspection of successul, failed and errored login attempts when an external identity provider has been set up for OpenShift. Result: OpenShift's login audit trail contains successful, failed and errored login attempts to the OpenShift console when login is mediated by an external identity provider.
Clone Of:
Environment:
Last Closed: 2022-08-10 11:12:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oauth-server pull 103 0 None open Bug 2086465: External OAuth: create audit logs for auth events 2022-05-16 08:59:27 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:12:11 UTC

Description Pierre Prinetti 2022-05-16 08:58:38 UTC
Description of problem:
Authentication mediated by external identity providers should be logged in the audit trail. When available, the internal mapping of the identity confirmed by the external identity provider should be attached to both successful and unsuccessful authentication events.

Version-Release number of selected component (if applicable):


How reproducible: 100%

Steps to Reproduce:
1. Set up Github external authentication[1]
2. Log in through Github
3. The audit trails should contain either an indication of success, or an indication of denial or failure[2]


[1]: https://docs.openshift.com/container-platform/4.10/authentication/identity_providers/configuring-github-identity-provider.html
[2]: for oauth_pod in $(oc -n openshift-authentication get pods -oname); do
oc rsh -n openshift-authentication "$oauth_pod" cat /var/log/oauth-server/audit.log
done

Actual results:
The audit log does not contain login information.

Expected results:
For each login attempt carried through an external identity provider, the audit log should contain an entry containing:
A. an annotation with key "authentication.openshift.io/decision" and a value of allow, or deny, or error;
B. possibly, an annotation with key "authentication.openshift.io/username" and a value of the OpenShift user the login attempt was targeting.


Additional info:

Comment 3 Xingxing Xia 2022-06-02 14:00:28 UTC
This bug is tested via https://issues.redhat.com/browse/AUTH-6 cases with google, github, gitlab openid, google openid, ldap, request header, basic auth IDPs, work well in the annotations in audit logs for successful and failed logins.

Comment 5 errata-xmlrpc 2022-08-10 11:12:00 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security 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/RHSA-2022:5069


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