API Automation - signer information does not match signer information of other classes in the same package - rest

enter image description hereWhile executing the POST API endpoint am getting "java.lang.SecurityException": class "org.hamcrest.Matchers"'s signer information does not match signer information of other classes in the same package.
Anyone solution for this issue
enter image description here

Related

How to update details to existing spl-token

I am trying to update the token metadata for my existing token. Is there any other steps needed to be carried out to update the token metadata correctly?
I have updated the token metadata by using Strata Protocol Token Launchpad (https://app.strataprotocol.com/edit-metadata) 1 week before. But it didn't reflect on the token logo and name at all on the Solana Explorer.
Token Address: https://explorer.solana.com/address/7KG5WNqNbUdXY5MBX7TUVZMTSD5cGoYxwYwry96GD1sM/metadata
How can I update token name and logo correctly?
How can I edit or remove the social channels link with metadata?
Any help is appreciated as always. Thanks in advance.
The new standard to SPL token metadata is actually that the same of NFT's now.
Each token will have it's own token metadata account (which will need creating if token was created via the SPL Token CLI), in your case once was created for you if you used Strata to create the token.
Updating the SPL token metadata is now as simple as updating an NFT on Solana. Various tools such as https://metaboss.rs is one, Strata website should also work to update the token tool. I've also got a site which after testing updates tokens too just fine but at the moment adds in some unessaccery data related to NFT's, but functions. If you wish to try that let me know in a comment.
If Strata doesn't work for you you could try Metaboss.
You'll need to first upload an image and a JSON file to arweave that you would then link to each other.
Upload Image to Arweave or similar.
Create and upload a new json file (to arweave or similar) with a few attributes inside it.
https://github.com/solana-labs/token-list
You can see from the above document at Solana Labs that you need
{
"name": "TOKEN_NAME",
"symbol": "TOKEN_SYMBOL",
"description": "TOKEN_DESC",
"image": "TOKEN_IMAGE_URL"
}
in your JSON file. Your image URI should be a link to the image you uploaded in step one.
You can then use the update commands at metaboss to upload some onChain details such as name, symbol, and the URI.
https://metaboss.rs/update.html
Hmm got same problem here,
In my case, I setAuthority of the SPL token to null right after initiate and mint to make sure no one could ever mint more.
What they said "You must have mint authority in order to create or update the metadata", mean that existing spl-token have no way to update their metadata.

Url.Content not working when using under .net core 3.1 &

I am trying to follow below article for SAML implementation & i am very new to the .net core and SAML
https://developer.okta.com/blog/2020/10/23/how-to-authenticate-with-saml-in-aspnet-core-and-csharp
When added code into AuthController.cs , i am getting error for Login method. In below code Url.Content giving error 'The name url does not exist in current context'. Also package 'using Okta_SAML_Example.Identity;' is giving error regarding assembly as its not there.
var binding = new Saml2RedirectBinding();
binding.SetRelayStateQuery(new Dictionary<string, string> { { relayStateReturnUrl, returnUrl ?? Url.Content("~/") } });
Want to set the context : my idp will be internal organization idp [it will be configured by different team in org and for now they want me to provide attributes which i want in response] so where exactly in code it will be referred as i dont see IDP reference url in the code & xml sample too. please help me as need guidance at earlist.
I'm in doubt why you are seeing the error, it is not an error I have experienced.
You can try to download the ITfoxtec.Identity SAML 2.0 code and run the TestIdPCore and TestWebAppCore samples in the test folder.
The library documentation.
The IdP can be configured in the appsettings.json file, here an example from the TestWebAppCore sample. The easiest way is to configure the IdP metadata, which will establish the trust without further configuration.

Provide array of URNs to LinkedIn REST API?

I am using the LinkedIn Marketing Development Platform where I am trying to provide a list of company URNs to to the Ad Analytics API. However, when I try to provide a list of company URNs, it fails with status 400.
Analytics Finder endpoint docs
My request:
GET https://api.linkedin.com/v2/adAnalyticsV2?q=analytics&pivot=CAMPAIGN&dateRange.start.day=1&dateRange.start.month=1&dateRange.start.year=2017&timeGranularity=ALL&companies=urn:li:organization:1234,urn:li:organization:5678
Response:
{"message":"Array parameter 'companies' value 'urn:li:organization:1234,urn:li:organization:5678' is invalid. Reason: Deserializing output 'urn:li:organization:1234,urn:li:organization:5678' failed","status":400}
I have also tried URL encoding the URL, and providing the list via the parameter companies[0] as is done in other examples in the docs.
What is the correct way to input arrays to the LinkedIn API?
Edit: Changed accounts to companies
So the Protocol Version actually gave me some useful insight. There are a couple of ways of providing arrays in parameters.
From the docs:
For Restli V1.0 (used by default)
GET GET https://api.linkedin.com/people?ids=1&ids=2&ids=3
For Restli V2.0, which you can use by setting the following header: X-RestLi-Protocol-Version: 2.0.0
Pass parameters in List format.
GET https://api.linkedin.com/v2/people?ids=List(1,2,3,4)
However, I have not managed to get the Analytics Finder API to work with Restli V2.0.
You'll need to provide the list of URL encoded organization URNs to the accounts param. Using your request as an example:
&accounts=List(urn%3Ali%3Aorganization%3A1234,urn%3Ali%3Aorganization%3A5678)

View JWT Token on jwt.io

I came across the badge section on jwt.io and the 'View on jwt.io' caught my eye. Is there a way to link to jwt.io, which then shows the users JWT token (from my application) and my verification key?
Skimming through the code of their page I couldn't find a clue on how to do that. Did I miss something on their page?
I'm still trying to find the answer on how to preload the secret with my own, to help users see what was happening.
However I did manage to get the link to work correctly though:
https://jwt.io/#id_token=your-token-here
Found it on their blog post:
https://auth0.com/blog/2015/07/21/jwt-json-webtoken-logo/
Not sure how you were supposed to find it before they linked that post on jwt.io.
Also linking this here, because I only just found it. I had been trying to find a nicely formatted documentation for our users for ages (before we just linked them to jwt.io):
https://auth0.com/learn/json-web-tokens/
I know it is many years later, but I have found how to pre-load the keys information (which I could find by using the "Share JWT" option, which actually creates a link).
The jwt.io debugger accepts additional query parameters:
token - the JWT token value
publicKey - as the name implies
Probably it does accept private key parameter, if given, and properly URL encoded, but did not test it. The example below uses a JWK form for the public key, but PKCS#8 and PKCS#1 are also accepted.
Example

PDF signing with timestamp: certificate details does not appear in timestamp properties

I have a code that implements TSA server in format RFC 3161.
When I try to sign PDF file with timestamp using TSAClientBouncyCastle, I receive a signature where certificate details doesn't appear
Somebody know how to solve that?
I can post the code here, but I don't know which part of it.
It would be nice if someone could guide me to a specific section in the RFC, then I will post the relevant part of the code and we can discuss about it.
Thanks in advance
Link to sample pdf file
https://drive.google.com/file/d/0B61KdyZ43x-9cEk5YVV6WVd4WUU/view?usp=sharing
The reason why certain timestamp authority details do not appear is indicated in the Signature Properties dialog beneath the Advanced Signature Properties dialog you have in front in your screenshot:
Thus, you do not only have to inspect your PDF signing code but also your code that implements TSA server in format RFC 3161 or the certificates it uses.
The TSA certificate
Your TSA certificate is invalid.
Digging through your signature, I eventually had a look at the certificates. As it turns out, you seem to use the same certificate for signing the signature and the time stamp. This cannot work!
Cf the specification:
The TSA MUST sign each time-stamp message with a key reserved
specifically for that purpose. A TSA MAY have distinct private keys,
e.g., to accommodate different policies, different algorithms,
different private key sizes or to increase the performance. The
corresponding certificate MUST contain only one instance of the
extended key usage field extension as defined in [RFC2459] Section
4.2.1.13 with KeyPurposeID having value:
id-kp-timeStamping. This extension MUST be critical.
(Section 2.3.* Identification of the TSA *of RFC3161)
Your user certificate in particular does not have the required extended key usage marking it as a time stamping certificate.