Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
11 replies
Subscribers
7 subscribers
Views
4255 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
Using Basic Auth with HTTP Query Smart Service
vikramk
Certified Associate Developer
over 8 years ago
I have requirement to invoke the external rest webservice using basic auth with HTTP Query Smart Service. I need to read the credentials from a third party secure store. I have a Java Plugin to do so, however I see in the HttpAuthenticationBasic is Custom Data Type wth FieldKey, externalSystemKey. Any Idea can I use expression for the username/password to pull it from java plugin?. I see "Send HTTP Request" works for me and the Credentials are passed as simple text. I need to achieve the Http Basic Authentication using the "HTTP Query Smart Service". I tried giving the username and password value in the SCS username and SCS Password and I am getting below exception.
<a title="Title: Failed to retrieve value from SCS username=, Message: ObjectNotFoundException[]: The External System [identifier=] does not exist, has been deleted, or you do not have sufficient privileges to access its data. (APNX-1-...
OriginalPostID-240362
Discussion posts and replies are publicly visible
0
vikramk
Certified Associate Developer
over 8 years ago
...4217-001), Details: The External System [identifier=] does not exist, has been deleted, or you do not have sufficient privileges to access its data.">Title: Failed to retrieve value from SCS username=, Message: ObjectNotFoundException[]: The External System [identifier=] does not exist, has been deleted, or you do not have sufficient privileges to ...</a>
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 8 years ago
As basic auth is just a header in HTTP, have you tried to add your information as a header?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vikramk
Certified Associate Developer
over 8 years ago
I did add Authorization header and it didn't work :(
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 8 years ago
How exactly did you do that? The header should look like this: Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vikramk
Certified Associate Developer
over 8 years ago
Yep.. I did that Authorization: Basic cAZkY19vaW06Dzc4WlJbTHR=
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 8 years ago
So the attribute header names looks like "={"Authorization"}" and header values like "={"Basic cAZkY19vaW06Dzc4WlJbTHR="}". And the basic auth fields are all empty?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vikramk
Certified Associate Developer
over 8 years ago
Attached is the screen shot.. I got 401
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 8 years ago
That is odd. I can remember I did exactly this quite a while ago. Maybe someone else has an idea.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ajaved
A Score Level 1
over 8 years ago
@vikramk are you trying to configure HTTP Query Smart Service?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ajaved
A Score Level 1
over 8 years ago
@vikramk I use the following to pass credentials using third party credential store.
a!httpAuthenticationBasic(a!scsField("<third-party-credential-store-name>","username"), a!scsField("<third-party-credential-store-name>","password"), true)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>