Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Audit log: Log when User/Role is Added to Group Within Tenant #982

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Ellen-Yi-Dong
Copy link
Contributor

@Ellen-Yi-Dong Ellen-Yi-Dong commented Dec 12, 2023

DO NOT MERGE UNTIL RELATED PRS ARE MERGED:
PR 1: Create Django Model and Migrations

PR 2: When Group/Role in Tenant is Created/Edited/Deleted

Link(s) to Jira

-JIRA ticket: RHCLOUD-19119

Description of Intent of Change(s)

The what, why and how.

When an user/role is added to a group, the following actions will be added to the audit log database, and when you curl this command:

curl 'localhost:8000/api/rbac/v1/auditlogs/'

It should list the actions that the user made when the user/role is added to the audit logs

Changes that were made:

  • Added "log_add" method within audit_log/model.py
  • Changed group/definer.py to return a list of the roles that can be used when a group is being added
  • Added changes to group/view.py
  • Add principal
  • [Add role]

Local Testing

How can the feature be exercised?
How can the bug be exploited and fix confirmed?
Is any special local setup required?

Checklist

  • if API spec changes are required, is the spec updated?
  • are there any pre/post merge actions required? if so, document here.
  • are theses changes covered by unit tests?
  • if warranted, are documentation changes accounted for?
  • does this require migration changes?
    • if yes, are they backwards compatible?
  • is there known, direct impact to dependent teams/components?
    • if yes, how will this be handled?

Secure Coding Practices Checklist Link

Secure Coding Practices Checklist

  • Input Validation
  • Output Encoding
  • Authentication and Password Management
  • Session Management
  • Access Control
  • Cryptographic Practices
  • Error Handling and Logging
  • Data Protection
  • Communication Security
  • System Configuration
  • Database Security
  • File Management
  • Memory Management
  • General Coding Practices

@Ellen-Yi-Dong Ellen-Yi-Dong changed the title Audit log: Log when User/Role is Added to Group Within Tenant [WIP] Audit log: Log when User/Role is Added to Group Within Tenant Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant