Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-34600

Unable to add old privileges to role after migrating to postgresql

    Details

    • Sprint:
      NXRM Optimus Sprint 46
    • Notability:
      2

      Description

      ISSUE:
      Post migration to postgresql unable to add an old privilege to role.

      ERROR:
      An error occurred saving data. Privilege 'my public group - (update)' contained in role 'my-deploy' not found.

      CAUSE:
      Old privileges have different id than name.

      {
              "description": "Privilege that gives read access to my public group",
              "id": "2a85a2b9357d52",
              "name": "my public group - (create)",
              "properties": {
                  "actions": "add",
                  "repository": "my-public-group",
                  "contentSelector": "All_any"
              },
              "readOnly": false,
              "type": "repository-content-selector",
              "version": 1
          },
      

      Nexus 3.40.1 searches id column for privilege name, which doesn't exist in this case.

      2022-08-09 16:13:37,859+1000 DEBUG [qtp1622773508-793]  admin org.sonatype.nexus.internal.security.model.CPrivilegeDAO.read - ==>  Preparing: SELECT * FROM privilege WHERE id = ?;
      2022-08-09 16:13:37,859+1000 DEBUG [qtp1622773508-793]  admin org.sonatype.nexus.internal.security.model.CPrivilegeDAO.read - ==> Parameters: my public group - (create) (String)
      2022-08-09 16:13:37,860+1000 DEBUG [qtp1622773508-793]  admin org.sonatype.nexus.internal.security.model.CPrivilegeDAO.read - <==      Total: 0
      2022-08-09 16:13:37,861+1000 DEBUG [qtp1622773508-793]  admin org.apache.ibatis.transaction.jdbc.JdbcTransaction - Resetting autocommit to true on JDBC Connection 
      

      EXPECTED RESULT:
      Nexus 3.40.1 able to handle migrated old privileges.

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            sappusamy Srinivasan Appusamy
            Last Updated By:
            Anjali Arora Anjali Arora
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:

                tigCommentSecurity.panel-title