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!

    OT - Credential Property broken ?

    Scheduled Pinned Locked Moved Support
    otter
    9 Posts 3 Posters 24 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.
    • P Offline
      philippe.camelio_3885
      last edited by philippe.camelio_3885

      Hi,
      Bug or not ?
      it seems it is no longer possible to get Password from Secure Credentials.
      It is not possible to read the Password from Secure Credential
      Same result if OtterScript usage is unchecked (tested just in case ...)

      • Create a secure crednetial as "Username & Password" and allow OtterScript usage
        6a080e1f-6b10-4f45-9d55-47f6058d69d6-image.png

      • Create an otter script

        set $CredentialUser = $CredentialProperty(svc-inedo, Username);
        set $CredentialPwd = $CredentialProperty(svc-inedo, Password);
      

      306927a6-72d1-48ea-926d-118003c852f6-image.png

      This was working on OT v2.2.23 / tested OT v2022.10

      Best regards
      PhilippeC.

      1 Reply Last reply Reply Quote 0
      • rhessingerR Offline
        rhessinger inedo-engineer
        last edited by

        Hi @philippe-camelio_3885,

        Looking at the code for v2022.10, there is nothing apparent that sticks out to why this wouldn't work. Just to verify, you do not have any other credentials (or legacy credentials) with the same name do you? The only thing that I see in the code would be due to how things are returned and sorted by the function, if there would happen to be two credentials with the same name, it may return the wrong credential which would have the wrong value set.

        Thanks,
        Rich

        Products Engineer, Inedo

        1 Reply Last reply Reply Quote 0
        • P Offline
          philippe.camelio_3885
          last edited by

          I understand.
          I checked twice and found nothing in double.

          I created a new Credential test. ==> Same problem. I don't see what I am doing wrong 😞

          otter script very simple:

            set $CredentialUser = $CredentialProperty(test, Username);
            set $CredentialPwd = $CredentialProperty(test, Password);
          

          also tried with :

           set $CredentialUser = $SecureCredentialProperty(test, Username);
           set $CredentialPwd = $SecureCredentialProperty(test, Password);
          

          to be more complete, this the docker version

          atrippA 1 Reply Last reply Reply Quote 0
          • atrippA Offline
            atripp inedo-engineer @philippe.camelio_3885
            last edited by

            Hi @philippe-camelio_3885 ,

            I can't reproduce this at all....

            1. Admin > Secrure Credentials> Create
            2. test with Username = myuser, PAssword = mypass, check "function usage allowed"
            3. Create script Credtest.otter with contents below
            4. Run as Ad-hoc job on local host <-- works OK
            5. Admin > Secure Credentials, uncheck function allowed
            6. Run as Ad-hoc job on local host <-- failed as expected
            7. Admin > Secure Credentials, check function allowed
            8. Run as Ad-hoc job on local host <-- works OK

            So it seems to be working as expected. And as Rich mentioned, the code seems fine and hasn't been changed.

            Here's the script:

             set $CredentialUser = $SecureCredentialProperty(test, Username);
             set $CredentialPwd = $SecureCredentialProperty(test, Password);
            
             Log-Information User is $CredentialUser, Password is $CredentialPwd;
            
            1 Reply Last reply Reply Quote 0
            • P Offline
              philippe.camelio_3885
              last edited by

              😥
              I have done exactly what you did and the pb is still there.
              I really don't understand.

              Next week, I'll make a test on fresh install and I will update the thread.

              Thanks for your time
              Best regards
              PhilippeC.

              atrippA 1 Reply Last reply Reply Quote 0
              • atrippA Offline
                atripp inedo-engineer @philippe.camelio_3885
                last edited by

                @philippe-camelio_3885 thanks for confirming that it was broken, I took a closer look and figured it out :)

                It will be shipped in the next maintenance release as OT-492 (and also in BuildMaster via BM-3846)

                1 Reply Last reply Reply Quote 0
                • P Offline
                  philippe.camelio_3885
                  last edited by

                  @atripp said in OT - Credential Property broken ?:

                  or confirming that it was broken, I took a closer look and figured it out :)

                  I made new test form fresh install

                  • 22.0.10 -> test OK
                  • 22.0.9 -> OK
                  • update 22.0.9 to 22.0.10 -> test OK

                  I don't understand why the instance I am working on is not ok.
                  There is no bug, I apologized .

                  I will restart a new fresh instance and i reimport what I have already done.

                  Thanks for you time

                  atrippA 1 Reply Last reply Reply Quote 0
                  • atrippA Offline
                    atripp inedo-engineer @philippe.camelio_3885
                    last edited by

                    Hi @philippe-camelio_3885 , there's definitely a bug... it was just hard to reproduce.

                    The issue was the Otter was looking at the wrong credential to determine if function access was allowed...

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      philippe.camelio_3885
                      last edited by

                      👍
                      I thought I was wrong

                      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