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

[BUG]: Schema Filter not able to match exact Schema name match #777

Closed
1 task
holashchand opened this issue Aug 22, 2023 · 3 comments · Fixed by Sunbird-RC/sunbird-rc-core#272
Closed
1 task
Assignees

Comments

@holashchand
Copy link
Contributor

holashchand commented Aug 22, 2023

What is the bug related to?

Registry Core

What went wrong?

Case:

When one of schema has a name which contains other schema name

Issue:

it is trying to check for properties of wrong schema, causing many issues. Mainly authorisation conflict seen as of now.

Steps to reproduce

  1. Create two schemas Student, StudentFromUP
  2. Put different roles in both of the schemas
  3. Create StudentFromUP and do a GET call with StudentFromUP token
  4. response 403

What did you expect to see?

  • request should match exact schema name in SchemaFilter, it should not check for properties of other schema

Additional Context

check SchemaFilter logic in registry configs

Relevant logs/output (if any)

No response

@chopadetejaswini
Copy link

Understanding :
There are 2 schema a "Student" schema and a "StudentFromUP" schema. These schemas might be used to define certain entities or objects in the system. The problem arises when a schema name contains the name of another schema. This situation leads to the system trying to check properties of the wrong schema, causing various problems. One of the noticeable problems is an authorization conflict. the request should match the exact schema name defined in the SchemaFilter. It should not attempt to check properties of other schemas.

@chopadetejaswini
Copy link

For this task we need keycloak, so worked to start the keycloak, for that upgrade the docker, and docker compose. bothe versions are same now. started keycloak, tried to pull other service images, created 2 schema and add in sunbirdRC-public-schema. tried to get access token but its showing error.

@chopadetejaswini
Copy link

  registry and db is working now, I have tried for keycloak, tried to upgrade the docker client version, tried to remove the docker and then install and upgrade it but not upgraded, keycloak is not working so Not able to do this task without keycloak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

2 participants