1 2 Previous Next 16 Replies Latest reply on Aug 31, 2011 12:43 PM by Chris Cambers

    "No cached credentials" problem

      I've read through most of the posts on this subject and I'm still at a loss....looking for some guidance....

       

      I'm creating a script to create a BLPackage, and this is my first time using the blcli performance commands.  When I execute the

       

       

      blcli_connect command manually from the NSH window it works fine, but when I put it in a .nsh file and try to execute the file from within the window I'm getting "No cached Session Credential for named service profile - please login". 

       

      In the script I am setting serviceProfileName and roleName just prior to the blcli_connect command, and I've logged into the BL

      console and selected "cached credentials" when I logged in.

       

      If I do a "blcred cred -test" it will prompt me for a profile name, and I'm not getting an error message after I enter one so I'm assuming the test is passing. 


      This seems like an easy issue, so I'm pretty sure this is just me being a novice.  Not sure what to do next, any input would be

      appreciated.

        • 1. "No cached credentials" problem
          Bill Robinson

          if you run a 'blcred -list' what do you get?

          • 2. "No cached credentials" problem

            Here's what I'm seeing:

             

            Username:         cambersc@xxx.xxx
            Authentication:   Domain Authentication
            Issuing Service:  service:authsvc.bladelogic:blauth://DC1PRBLAP11:9840
            Expiration Time:  Thu Aug 25 20:43:36 EDT 2011
            Maximum Lifetime: Thu Aug 25 20:43:36 EDT 2011
            Client address:   10.xxx.xxx.xxx
            Authorized Roles:
            {role1}
            {role2}
            {role3}
            .
            .
            .

            Destination URLs:
                service:appsvc.bladelogic:blsess://dc1prblap11:9841
                service:proxysvc.bladelogic:blsess://dc1prblap11:9842

             

             

            Thanks for the help!

            • 3. "No cached credentials" problem
              Bill Robinson

              so then in the nsh script you should do:

               

              blcli_setoption serviceProfileName <profileName>

              blclI_setoption roleName <role>

              blcli_connect

               

              what happens when you do that?

              • 4. "No cached credentials" problem

                This is where I think I’m doing something wrong, or I’m just not understanding something…

                For ‘serviceProfileName’ I’ve been using ‘AuthServer02’, which is what I see if I do a ‘blcred authprofile –list’:

                 

                Name: AuthServer02

                Type: Domain Authentication

                URL:  service:authsvc.bladelogic:blauth://DC1PRBLAP11:9840

                 

                If I use ‘AuthServer02’ as the serviceProfileName I get:

                 

                Exception in thread "main" com.bladelogic.session.client.SessionLoginException:

                No cached Session Credential for named service profile - please login.

                        at com.bladelogic.cli.CliLoginOperations.getSessionCredentialFromCache(C

                liLoginOperations.java:192)

                .

                .

                .

                 

                If I use ‘cambersc@xxx.xxx’ as the serviceProfileName I get:

                 

                Exception in thread "main" com.bladelogic.session.client.SessionLoginException:

                No authentication profile matching service profile name "cambersc@xxx.xxx".

                        at com.bladelogic.cli.CliLoginOperations.getSessionCredentialFromCache(C

                liLoginOperations.java:177)

                .

                .

                .

                 

                This is where my confusion is:  I don’t think I’m setting serviceProfileName correctly and I’m not sure what it should be.

                 

                Thanks!

                • 5. "No cached credentials" problem
                  Bill Robinson

                  when you login via the gui, what is the name of the auth profile you select ?

                  • 6. "No cached credentials" problem

                    AuthServer02

                    • 7. "No cached credentials" problem
                      Bill Robinson

                      what if you run:

                       

                      blcred cred -acquire -profile AuthServer02 -username chambersc

                       

                      then the blcli_setoptions and connect ?

                      • 8. "No cached credentials" problem

                        Implemented what you suggested so the script starts:

                         

                        blcred cred -acquire -profile AuthServer02 -username cambersc

                        blcli_setoption serviceProfileName "AuthServer02"

                        blcli_setoption roleName "[role]"

                        blcli_connect

                         

                         

                        I got prompted for a password, which I entered and then received:

                         

                        Authentication succeeded: acquired session credential

                         

                         

                        Then:

                         

                        Exception in thread "main" com.bladelogic.session.client.SessionLoginException:

                        No cached Session Credential for named service profile - please login.

                                at com.bladelogic.cli.CliLoginOperations.getSessionCredentialFromCache(C

                        liLoginOperations.java:192)

                        .

                        .

                        .

                        • 9. "No cached credentials" problem
                          Bill Robinson

                          is the gui/nsh installed on your local workstation?

                           

                          do you have roaming profiles or a re-directed home dir - what does

                          'echo %USERPROFILE%' show from a dos prompt ?

                           

                          if you look in %APPDATA%\BladeLogic, what do you see ?

                          • 10. "No cached credentials" problem

                            GUI & NSH installed - yes.

                             

                            echo %USERPROFILE%

                                 c:\users\cambersc

                             

                             

                            Contents of %APPDATA%\BladeLogic:

                             

                            C:\Users\cambersc\AppData\Roaming\BladeLogic>dir
                            Volume in drive C is OSDisk
                            Volume Serial Number is 089F-958F

                            Directory of C:\Users\cambersc\AppData\Roaming\BladeLogic

                            06/29/2011  03:52 PM    <DIR>          .
                            06/29/2011  03:52 PM    <DIR>          ..
                            06/27/2011  05:22 PM             1,182 blcli-log.cf
                            08/24/2011  05:50 PM         3,516,415 blcli.log
                            08/25/2011  02:26 PM             8,796 bl_sesscc
                            06/23/2011  05:28 PM             1,632 client_keystore.pkcs12.PEM
                            05/18/2011  10:54 AM               929 config.properties
                            05/18/2011  04:40 PM    <DIR>          images
                            08/25/2011  02:17 PM    <DIR>          Workspace1
                            08/19/2011  12:03 PM    <DIR>          Workspace2
                            07/01/2011  04:18 PM    <DIR>          Workspace3
                                           5 File(s)      3,528,954 bytes

                            • 11. "No cached credentials" problem
                              Bill Robinson

                              can you cat bl_sesscc ?

                              • 12. "No cached credentials" problem

                                Yes...left out the extra roles and cut out most of <serviceTicket>:

                                 

                                 

                                <MessageObject>

                                  <username>cambersc@xxx.xxx</username>

                                  <site/>

                                  <serviceURL>service:authsvc.bladelogic:blauth://DC1PRBLAP11:9840</serviceURL>

                                  <AuthProtocolMsg>

                                    <SessionCredential employedAuthType="ADK_PASSWORD" updateSRPPasswordOnly="false">

                                      <clientAddress>10.xxx.xxx.xxx</clientAddress>

                                      <destinationServiceURLs>

                                        <serviceURL>service:appsvc.bladelogic:blsess://dc1prblap11:9841</serviceURL>

                                        <serviceURL>service:proxysvc.bladelogic:blsess://dc1prblap11:9842</serviceURL>

                                      </destinationServiceURLs>

                                      <authorizedRoles>

                                        <role>

                                          <id>1000010</id>

                                          <name>BLAdmins</name>

                                        </role>

                                        <role>

                                          <id>3</id>

                                          <name>RBACAdmins</name>

                                        </role>

                                        .

                                        .

                                        .

                                      </authorizedRoles>

                                      <expirationTime>2011-08-26 00:26:13.947 EDT</expirationTime>

                                      <maximumLifetime>2011-08-26 00:26:13.947 EDT</maximumLifetime>

                                      <serviceTicket>

                                 

                                2LsPufqm686xQ88ao8yizdKp7P6UJqBuo1/T6vCWcSA8XVIll3Rik/3Y0tPkKhL7lLpwaUzdqx2K

                                tsNqvdV3ZC53CxIdEeWP6kfhiyLcWo+Rc5oQHftuOLwb/ZYAAAAAAAA=</serviceTicket>

                                    </SessionCredential>

                                  </AuthProtocolMsg>

                                </MessageObject>

                                • 13. "No cached credentials" problem
                                  Bill Robinson

                                  run blcred then get into nsh and run:

                                   

                                  blcli_setoption serviceProfileName <profile>

                                  blclI_setoption roleName <role>

                                  blcli_setoption ssoCredCacheOpt <path to blsess_cc file>

                                  blcli_connect

                                   

                                  the path should be like:

                                  /C/Users/bill/AppData/Roaming/BladeLogic/bl_sesscc

                                  • 14. "No cached credentials" problem

                                    OK!  That seems to get me farther down the road, I'm not getting an error at the blcli_connect.  But, when the script executes the next blcli command I’m getting:

                                     

                                    Exception in thread "main" com.bladelogic.session.client.SessionLoginException:

                                    No authentication profile name specified.

                                     

                                    The command that’s being executed is:

                                    DEPOT_GROUP_ID=`blcli_execute DepotGroup groupNameToId "$DEPOT_GROUP"`

                                     

                                    Thanks for the help!

                                    1 2 Previous Next