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

RHCLOUD-30751 Principal links endpoint update #1440

Conversation

EvanCasey13
Copy link
Contributor

@EvanCasey13 EvanCasey13 commented Jan 15, 2025

Link(s) to Jira

https://issues.redhat.com/browse/RHCLOUD-30751

Description of Intent of Change(s)

Incorrect response when sending a request to principals endpoint for links, last should not be null.

"links": {
    "first": "/api/rbac/v1/principals/?limit=2&offset=0",
    "next": "/api/rbac/v1/principals/?limit=2&offset=36",
    "previous": "/api/rbac/v1/principals/?limit=2&offset=32",
    "last": null
  },

Changed from last:null to
"last": f"{path}?limit={limit}&offset={last_link_offset}{usernames_filter}",

Local Testing

How can the feature be exercised?
Run this curl command when running RBAC locally

curl -v "http://localhost:8000/api/rbac/v1/principals/" -H "accept: application/json"

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

@EvanCasey13 EvanCasey13 changed the title Principal links endpoint update RHCLOUD-30751 Principal links endpoint update Jan 21, 2025
Copy link
Contributor

@petracihalova petracihalova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I have only few tiny comments

rbac/management/principal/view.py Outdated Show resolved Hide resolved
rbac/management/principal/view.py Outdated Show resolved Hide resolved
@petracihalova petracihalova merged commit bd0ae58 into RedHatInsights:master Feb 7, 2025
11 checks passed
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.

2 participants