Bamboo permissions are not getting assigned to usernames that contain uppercase letters via Specs

XMLWordPrintable

    • 5
    • Severity 3 - Minor
    • 5

      Issue Summary

      Bamboo permissions are not getting assigned to external users that contain uppercase letters in their usernames via Bamboo Specs. This only affects users coming from an external user directory (e.g. Crowd, Microsoft Active Directory, and etc). This problem does not affect Bamboo internal users.

      Here's an example. Imagine Bamboo is connected and pulling users, groups, and memberships from Crowd. There are two users a) user John with a username johnDoe and b) Bruno with username brunorosa. There's a capital D in John's username. Both users will get synced to Bamboo and their usernames stored in their original forms inside Bamboo's database (i.e. johnDoe and brunorosa). You want to give both users access to a plan using YAML Specs. The problem here is that no matter what letter case you use in the YAML file to give John access to the plan it won't work (e.g. johnDoe, JOHNDOE, johndoe, and etc). On the other hand you can do the same thing with Bruno and it will work (e.g. brunorosa, BrunoRosa, BRUNOROSA, and etc). The problem lies in the way the username came from Crowd and got stored inside Bamboo's database and not how you write the username in the Specs file.

      This is reproducible on Data Center:

      Steps to Reproduce

      1. Connect Bamboo to an external user directory.
        • If you're connected to Crowd make sure the option "Lower case output" is not checked inside Crowd - for the Bamboo application - otherwise you won't be able to reproduce this issue.
      2. Create two users a) johnDoe and b) brunorosa.
      3. Make sure the user directory synchronization is working and the users are showing up inside Bamboo.
      4. Create a new project and plan using Bamboo YAML Specs.
      5. Give both users access to your plan inside the YAML Specs file.
        • Here you can use whatever letter case you prefer (e.g. use the username's original form, all uppercase or lowercase letters, and etc).
          Example 1
          ---
          version: 2
          plan:
            key: PLAN-KEY
          
          plan-permissions:
            - users:
                - brunorosa
                - johnDoe
              permissions:
                  - view
                  - edit
                  - build
                  - clone
                  - admin
          
          Example 2
          ---
          version: 2
          plan:
            key: PLAN-KEY
          
          plan-permissions:
            - users:
                - BRUNOROSA
                - JOHNDOE
              permissions:
                  - view
                  - edit
                  - build
                  - clone
                  - admin
          
          Example 3
          ---
          version: 2
          plan:
            key: PLAN-KEY
          
          plan-permissions:
            - users:
                - BrunoRosa
                - johndoe
              permissions:
                  - view
                  - edit
                  - build
                  - clone
                  - admin
          
      1. Push the changes made to your YAML file and make sure Bamboo is capable of successfully scanning the file.
        • It's important to note that this change will not break your Specs scan. If Bamboo is failing to scan your YAML file there's something else happening.

      This issue is also applicable to Deployment project permissions and environment permissions as well. 

      Expected Results

      1. Navigate to the plan's permissions page from the UI using an account with access to the plan you're making changes.
      2. Both users will show up in the page with all the permission boxes checked.

      Actual Results

      Both users will indeed show up in the plan permissions page but all the permission assigned to johnDoe will be unchecked whereas the permissions assigned to brunorosa will be checked. John will not be able to access the plan in question.

      Workaround

      • Assign permissions to groups instead of users.

            Assignee:
            Sylwester Jeruzal (Inactive)
            Reporter:
            Bruno Rosa
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: