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

fix: access token: fix utilisation multiple de la même route #893

Merged
merged 15 commits into from
Dec 13, 2023

Conversation

remy-auricoste
Copy link
Collaborator

@remy-auricoste remy-auricoste commented Dec 6, 2023

  • Avec un access-token, les resources et access ne sont plus vérifiés. On vérifie juste si le token a le droit d'appeler la route avec les params/querystring correspondants.
  • On a maintenant la possibilité de générer un token donnant droit à toute les valeurs pour un param ou une querystring donné.
    Exemple :
generateScope({
          schema,
          options: {
            params: {
              id: { allowAll: true },
            },
            querystring: {
              establishment_siret: "123456",
              skip: { allowAll: true },
            },
          },
        })
  • fix un bug qui empêchait de donner plusieurs accès à la même route avec des params / querystring différents

@remy-auricoste remy-auricoste self-assigned this Dec 6, 2023
Copy link

github-actions bot commented Dec 6, 2023

To deploy this PR just add a comment with a simple 🚀

@remy-auricoste remy-auricoste marked this pull request as ready for review December 7, 2023 10:39
@remy-auricoste remy-auricoste requested a review from a team as a code owner December 7, 2023 10:39
server/src/security/accessTokenService.ts Outdated Show resolved Hide resolved
@remy-auricoste remy-auricoste added this pull request to the merge queue Dec 11, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 11, 2023
@remy-auricoste
Copy link
Collaborator Author

🚀

@remy-auricoste
Copy link
Collaborator Author

🚀

1 similar comment
@remy-auricoste
Copy link
Collaborator Author

🚀

Copy link

🚀 Prévisualisation

https://893.labonnealternance-preview.apprentissage.beta.gouv.fr/

You can access runner logs in https://github.com/mission-apprentissage/labonnealternance/actions/runs/7184442215

To re-deploy just add a comment with 🚀

@remy-auricoste remy-auricoste added this pull request to the merge queue Dec 13, 2023
Merged via the queue into main with commit 6f90bbc Dec 13, 2023
6 checks passed
@remy-auricoste remy-auricoste deleted the fix-access-token-multi-route-use branch December 13, 2023 15:34
Copy link

🎉 This PR is included in version 1.203.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants