Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • S seismic-dms-service
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 55
    • Issues 55
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Open Subsurface Data Universe SoftwareOpen Subsurface Data Universe Software
  • Platform
  • Domain Data Management Services
  • Seismic
  • Seismic DMS Suite
  • seismic-dms-service
  • Merge requests
  • !216

fix: user addition to groups and enforces idempotency

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Varunkumar Manohar requested to merge slb/vm/bug-fix-useradd into master Sep 22, 2021
  • Overview 9
  • Commits 17
  • Pipelines 28
  • Changes 11

This MR fixes an issue with user addition

  1. Previously during user addition, the userEmail was explicitly removed first and then re-added. This operation can be performed any number of times using a JWT issued for any authorized entity other the userEmail. However when the same userEmail is added the second time using a JWT authorized for the userEmail, the user addition logic removes the user first. Since this removal, the JWT with azp set to userEmail loses complete access to the subproject/dataset.

  2. There is a need to maintain idempotency for the user entitlements to fix 1). This MR catches 409 conflicts and if the expectedRole for the input userEmail does not match the existing entitlements role then an error is thrown. If the roles match no error is returned. This ensures the useremail can be added any number of times if the entitlements role and the user input role matches.

  3. If an error is returned with 409 Conflicts, then the end-user will need to first delete the user completely and re-add.

  4. Refactors the code for improving readability

Edited Sep 28, 2021 by Varunkumar Manohar
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: slb/vm/bug-fix-useradd