Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Limiting Resource Credentials in Environments

    Scheduled Pinned Locked Moved Support
    buildmastersecurity
    4 Posts 3 Posters 13 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jneuharth_9094
      last edited by

      We would like to limit down specific resource credentials by the environment. Below is a resource credential we set up. Notice the environment is set to "Production."

      Image Text

      I have a plan where I'm pulling this Resource Credential and handing it to a global script to set the specific values I'm looking for. For a rough example:

      set $myUsername = $GetCredentialProperty(UsernamePassword::ExampleDBProduction, UserName);
      set $myPassword = $GetCredentialProperty(UsernamePassword::ExampleDBProduction, Password);
      
      PSCall GLOBAL::Secure-Test
      (
          username: $myUsername,
          password: $myPassword,
      );
      

      I have set "Agents.EnforceServerRestrictions" to be on.

      Image Text

      I have also limited the user (or group) as a restriction on the task/permissions.

      Image Text

      Image Text

      But I'm able to pull the Resource Credential that was limited to "Production" to "Test" with my user that is also restricted from "Production".

      Image Text

      Is this a bug or do I have something wrong in the setup.

      Product: BuildMaster
      Version: 5.8.2

      1 Reply Last reply Reply Quote 0
      • T Offline
        thoven
        last edited by

        This exact feature was added in v6.0; in that version there is another checkbox when editing the resource credential to "Restrict by environment" and it behaves exactly as you describe.

        As a side note, the Agents.EnforceServerRestrictions setting is designed to catch server/environment mismatches (i.e. error out when deploying to stage associated with Integration and targeting a server associated with Production) when deploying and will not affect credentials.

        1 Reply Last reply Reply Quote 0
        • J Offline
          jneuharth_9094
          last edited by

          @Todd

          Upgraded to version 6.0.4 and was able to block the access to the creditial in the plan as expected.

          With that said, I'm still able to access the credential via the administration area (/administration/credentials). Logging in with my limited user I can see the following (including the hidden if I open it).

          Image Text

          As a reminder here is the "restriction" I have set up for the limited user.

          Image Text

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            Found the follow-up issue as a user error. After upgrading to 6.0.x the feature worked as expected.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation