Maximo web services security - security

For securing Maximo web services on an environment security has been configured but without succeeding:
Maximo Web services has been created and tested via SoapUI successfully before applying security.
Security configuration has been applied at the EJB level since I'm using native security, this is as per IBM Maximo support note: https://www.ibm.com/support/pages/node/466937
I tried retesting the web service by sending a transaction having specified HTTP Header MAXAUTH with a value of username:password encoded as a Base64 string, where username:password is a valid Maximo user, but it was failing with the below response message:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns0:Fault xmlns:ns1="http://www.w3.org/2003/05/soap-envelope" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>ns0:Server</faultcode>
<faultstring>javax.xml.ws.WebServiceException</faultstring>
</ns0:Fault>
</S:Body>
</S:Envelope>
Kindly help.

It is working fine now after passing the correct HTTP header, below is the explanation:
When sending the transaction, the specified value for the HTTP Header MAXAUTH value was not in the correct format and encoding.
The correct value should be a in the following format username:password encoded as a Base64 string, where username:password is a valid Maximo user.
Correct value of username:password encoded as a Base64 string, where username:password is a valid Maximo user.
For example, if Maximo username:password is maxadmin:max12345! then the MAXAUTH HTTP header Base64 string value is bWF4YWRtaW46bWF4MTIzNDUh

Related

Generate/retrieve a SAS token programmatically for specific Blob/File under azure storage account via REST API in POSTMAN and then in IBM APP Connect

I have requirement where it has to be done programmatically using POSTMAN REST API, where I have to upload a file/blob to Azure storage account and retrieve the unique URL of the specific file that I have uploaded, and I have to share that URL to third party so that they can view it on browser.
This is what I have done in the POSTMAN
Request:
PUT https://{storage-account-name}.blob.core.windows.net/{container-name}/{file-name}{SAS-token}
Headers:
x-ms-version: 2020-04-08
x-ms-blob-type: BlockBlob
x-mock-response-name: Upload Blob
Body: Attached a file from my local
Response:
I have received 200 code and file is successfully uploaded. However, in the response headers I don't see any URL or unique SAS token that I can share to my third-party client.
I have also tried adding se and sp to sas token, I got the below error
AuthenticationFailed
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:65282b4e-401e-0050-2337-43ee90000000 Time:2023-02-18T01:20:28.3522177Z
**Signature did not match. String to sign used was r 2023-02-18T09:12:15Z /blob/storage-account-name/container-name/file-name.txt 2021-06-08 b **
Note: We don't want to generate SAS token manually from Azure portal for each file and construct the URL and share it to the client due to high traffic coming in. Once it is successful using POSTMAN. I have to implement the same in IBM App Connect enterprise, ESQL coding*
All the suggestions are much appreciated. Thank you in advance.
Retrieve the unique URL of the specific file that I have uploaded programmatically and share that URL with third party so that they can view it on browser.
In addition to the se and sp parameters, the following parameters are required to construct the correct SAS URL:
signed version (sv)
signed resource (sr)
signature
Your error message says that the signature does not match the rest of the URL. Signature a hash-based message authentication code (HMAC) that you compute over the string-to-sign and key by using the SHA256 algorithm, and then encode by using Base64 encoding
You can find how to construct the string-to-sign and signature depending on the version on this documentation page.
Postman has a built-in JavaScript library that can help you to calculate HMAC:
CryptoJS.HmacSHA1("string-to-sign", "key").toString()

HTTP POST to Microsoft DevOps API Returns 404

I have carefully followed the documentation outlined here by Microsoft to create a Bug in Dev Ops via the API. The documentation is well written.
Steps followed:
In Dev Ops I created a Personal Access Token, the string value of which I converted to Base64.
In a separate Power Automate flow, I composed a list of the projects in my target DevOps Organization for testing purposes. The JSON for the projects in this Organization is as follows:
Now if I copy and paste this URL (in the picture above) into my browser it resolves correctly.
I created a Postman HTTP POST Request with the following details:
URL: https://dev.azure.com/{my org}/{Demo guid}/_apis/wit/workitems/{{taskType}}?api-version=7.0
Under Authorization I set the Bearer Token and pasted in my encoded PAT
The JSON Body is as follows:
The POSTMAN variable in the URL taskType is set to Bug
The request Headers are as follows:
Once again please note that if I paste the URL (1) in green into a browser it resolves correctly. However, the request returns a 404 Page not found.
I cannot understand why it is not finding the page, as I would expect a not authorized error if the problem was with the token.
Looks like you have {{taskType}} as a literal in your URL string.
Just try to perform a List to find all the valid taskTypes. Also drop the Bearer token and just use Basic Auth to keep it simple. The username should be empty and password should contain your AzDO PAT.
Needed to include the $ symbol. I am now getting authentication issues but this is outside the scope of the original submission.

what is the code for getting auth code from azure in IBM BPM

I am trying to create rest request using Call Multipart form data REST API service in REST API toolkit. It requires apiURL, HTTPHEADER, PARAMETERtoPOST, httpMethod (using GET). I defined all the parameters(client id, client secret, response type (code), scope and response mode (query)) and httpheader - > Content -Type is application/x-www-form-urlencoded.
But in the response message I dont get the authcode even though when I create whole URL directly including parameters , I get the authcode but without Redirect URI. If I include redirect uri, it shows me that URI is not configured even though system admin for that showed me its configured.
So am I missing any parameters or anything else?

Azure APIM validating base64 encoded text when passing Content-Type as application/json?

I have an API operation defined on Azure APIM that accepts json payload.
The payload comprises of, among other attributes, an attribute which has a document in form of a base64 encoded string.
For certain payloads, which might potentially have invalid characters in the base64 encoded string, the APIM throws error 403 if the Content-Type header to "application/json". If the Content-type header is removed, it works fine.
My question is: Does APIM run any sort of validation on the payload if a content type is set? And if so, is there a way to get around that?
In most simple way APIM does not care about your payload at all. Do you have any policies in place? Some policies and policy expressions will try to read your body and may fail if request says that it's JSON, while it's not.
If possible, try to repro it in test console in Azure portal, trace tab there will show you the source of error.

How to connect Netsuite Rest Api with Pentaho Spoon Rest Client

I trying to access data from restlet using spoon rest client but it is not working. I am creating a field in add rows named creadentials. And passing this hole string in heders of rest client.
Authorization: NLAuth nlauth_account=12345, nlauth_email=jsmith#ABC.com, nlauth_signature=xxxx, nlauth_role=4
But i am getting error as no authorization headers.
I got the answer. We have to put authorization as name and
NLAuth nlauth_account=123, nlauth_email=abc#abc.com, nlauth_signature=password, nlauth_role=3
as value in add rows of spoon client and also add content-type as name and application/json as value then add all the fields in parameters. You have to add name as authorization and field authorization again name content-type field content-type. Remove default authorization username and password because we are sending it with the headers.

Resources