Split off from https://bugzilla.redhat.com/show_bug.cgi?id=1318353, as this was a second event requested in the comments. When external authentication is used upon first login we CloudForms creates a new CloudForms user record. When that record is created, we would raise an event, allowing the admin to configure an event handler as they see fit.
Please assess the impact of this issue and update the severity accordingly. Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition. If it's something like a tracker bug where it doesn't matter, please set the severity to Low.
This one is a little complicated because it's not clear where each of the authenticators actually creates the record. From what I can tell, the best place we can do this is here [1], but only when `user.new_record?`. I haven't looked at the other Authenticators like Amazon, as that has to be included as well, but it may end up at that same line. [1] https://github.com/ManageIQ/manageiq/blob/0afd317c6a8d5370427afb405d4a2257a130ffb3/app/models/authenticator/base.rb#L139-L140
PR for BZ https://github.com/ManageIQ/manageiq/pull/17852
Speaking with Mike Shriver we realised we create an audit message, but never create an event. Will create a follow up PR to do that.
Thanks Julian, I can confirm that I see audit log messages in my testing, but have no event that I can use to create alerts which was the original intent of the BZ.
PR to add MIQ Event for new user creation https://github.com/ManageIQ/manageiq/pull/18052
New commit detected on ManageIQ/manageiq/hammer: https://github.com/ManageIQ/manageiq/commit/3c2d5cbb3df34668ca51ca11ece0a5a18e733c85 commit 3c2d5cbb3df34668ca51ca11ece0a5a18e733c85 Author: Brandon Dunne <brandondunne> AuthorDate: Tue Nov 6 11:05:25 2018 -0500 Commit: Brandon Dunne <brandondunne> CommitDate: Tue Nov 6 11:05:25 2018 -0500 Merge pull request #18052 from juliancheal/raise_event_new_login Raise event on new user creation (cherry picked from commit d952e0896e02ee754d29754e7a20a43125c965fb) https://bugzilla.redhat.com/show_bug.cgi?id=1602136 app/models/authenticator/base.rb | 4 +- db/fixtures/miq_event_definitions.csv | 3 + spec/models/authenticator/database_spec.rb | 1 + spec/models/authenticator/ldap_spec.rb | 15 + 4 files changed, 22 insertions(+), 1 deletion(-)
Tested in CFME 5.10.0.25.20181120211723_d2fd659 An event was raised when the new user was created via successful external authentication. -- evm.log [----] I, [2018-11-27T09:13:02.862483 #14382:6c6f74] INFO -- : MIQ(MiqEvent#process_evm_event) Event Raised [user_created] -- Classic UI Control -> Log [----] I, [2018-11-27T09:13:02.863802 #14382:6c6f74] INFO -- : MIQ(policy-enforce_policy): Event: [user_created], To: []
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, 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-2019:0212