× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



so despite having other services run fine with a single "headers" (plural)
directive in the header, I specified header multiple times as needed as in
the example shared prior along with Authorization... and low and behold, it
worked.
"header":"Authorization,Bearer <token>"
So I see no harm going with this slightly less streamlined method.... happy
to say this is resolved.
progress over perfection.

thanks

Jay

On Mon, Jul 22, 2024 at 3:01 PM Buck Calabro <kc2hiz@xxxxxxxxx> wrote:

On 7/22/2024 1:36 PM, Jay Vaughn wrote:
but that is the exact format I'm using and it is not working

sql sate 38501
vendor code -443

axis error :httpTransportException: Cannot initialize a channel to the
remote end.

Depending on the rest of the error message in the job log, this is
probably an SSL handshake problem rather than an issue with the SQL.

The following works with a public web site and a generic token.
IBM i 7.4.

select
response_message,
response_http_header
from table(qsys2.http_get_verbose(
URL => 'https://authenticationtest.com',
OPTIONS => '{
"sslTolerate":"true",
"headers":{
"Accept":"*",
"Authorization":"Bearer t0k3nId"
}
}'
)
);

If you run this, copy the response_message to a decent editor, page to
the bottom and see if the token is set. Mine looks like:

<h5 class="card-title">Bearer Token</h5>
<p class="card-text">Set the
<code>Authorization: Bearer t0k3nId</code>
and see if it succeeds below.</p>
<div class="alert alert-success">Token Set</div>


My certs are in /QIBM/UserData/ICSS/Cert/Server/DEFAULT.KDB. I had to
make sure that my user profile has RX to all of the directories, and to
the KDB file. I found this by reading the docs for HTTP Functions
Overview
https://www.ibm.com/docs/en/i/7.4?topic=programming-http-functions-overview
- I had to sit down and pay attention to the whole thing, especially the
SSL Considerations paragraphs. Your group might choose to give *PUBLIC
*RX authority to the cert file (and directory tree.) If the certs in
there are in the public domain anyway, then it doesn't much matter who
can read them...

Bear in mind that your cert file might be elsewhere (see the docs for
one possibility), but you noted that http_get works for other sites, so
authority to the cert file is just a guess on my part.

--
--buck

http://wiki.midrange.com
Your updates make it better!


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.