Coder Social home page Coder Social logo

Comments (3)

github-actions avatar github-actions commented on June 11, 2024

Branch issue-235-Search_for_state_REVOKED_returns_VOLATILE_and_FIXED created!

from base-repo.

ThomasJejkal avatar ThomasJejkal commented on June 11, 2024

Well, the state attribute is a bit special when it comes to search. The reason is, that the state is used to determine whether a resource is visible to a user or not. As you probably know, there are the four states VOLATILE, FIXED, REVOKED, and GONE. Only VOLATILE and FIXED resources are visible to users, typically a resources is created in state VOLATILE and may or may not move to FIXED.

If a resource is deleted, which can be done by someone with ADMINISTRATE permissions (typically the owner), the resource enters the state REVOKED. In this state, the resource is only returned to users with role ADMINISTRATOR, who can then either patch the state back to VOLATILE/FIXED or delete the resource again to enter the state GONE (which also implies that all data is deleted).

Due to these restrictions it is internally enforced, that filtering for REVOKED resources is only performed if the caller has the role ADMINISTRATOR. Otherwise, the state is handled as if it was empty, i.e., filters for VOLATILE and FIXED are applied. Instead, if you provide FIXED as state in your search, only resources in state FIXED are returned.

You now may ask how it is possible assign the ADMINISTRATOR role for search...well, as I assume that you are not using authentication at all, i.e., only use the SELF identity, there is currently no way to do so, mainly for security reasons. Assigning the ADMINISTRATOR role is only possible when using external JSON Web Tokens issued by a KeyCloak instance.

from base-repo.

chkalch avatar chkalch commented on June 11, 2024

OK, I understand, thank you for the explanation (and yes you are correct I don't use authentication).

from base-repo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.