new API key for Filecoin Lotus node - filecoin

I'm trying to generate a new API-KEY for a Lotus node (existing one may have been compromised), but when I run lotus auth create-token --perm read it simply returns the existing key. The docs seem to suggest there is also an authnew command, but lotus authnew create-token --perm read throws an error "No help topic for 'authnew'". Does anyone know how to generate a new api key, assuming this is possible? Thanks so much for any assistance!
edit: it looks like lotus auth create-token --perm read just generates a key from the value in ~/.lotus/token, so the real question may be how to refresh or update this value...

try to use:
lotus auth create-token --perm read
I guess you should change your token to use those perms

Related

WinHttpSendRequest returns 12044 ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED

since 3 years I acces the ebay api from WinHttp. Since today I get error 12044, ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED, after calling WinHttpSendRequest. May I use whatever SSL certificate and load it from the store? Getting one from letsencrypt.org, install it and load it by CertFindCertificateInStore and enable it with WinHttpSetOption? How ebay know that this certificate is connected to my credentials like appid, certid and runame?
I have no idea what to do, sorry for that question.
Got it. Created a self-signed certificate, add it to store, exported a private key, granted access to this private key and load the key after creating the request.
WinHttpOpenRequest...
CertOpenStore...
CertFindCertificateInStore...
WinHttpSetOption...
CertFreeCertificateContext...
CertCloseStore...
WinHttpSendRequest...
In fact, added the lines from CertOpenStore to CertCloseStore. Nothing else changed and it works.

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.

Hiding fusion charts license

I have a purchased license at fusion charts. Fusion charts document says here... https://www.fusioncharts.com/dev/upgrading/license-activation that i have to use this function call for applying license...
FusionCharts.options.license({
key: 'KEY_GOES_HERE',
creditLabel: false,
});
if i put my key in that anyone visiting my website can easily take it from view -> source of browser. how do i avoid it ? It is simple HTML website.
You can use either of the followings :
Instead of passing the keys directly in JS code, pass them via the environment, application variables. And add the env file to gitignore
Use Obfuscation for the key and JS code being used for license activation.
You can store the value of the key in your database & and fetch the data value so that the end-user is unable to access it.
If you know the domain/sub-domains where charts will be used, you can restrict the license keys to those domains by sending a request to sales#fusioncharts.com
As far as I know, there is no way to completely hide it from the frontend. The reason for this is that even if the key is hidden in some way when the request is made, the information has to exist and so the key could be found by looking at the request data.
What you wish to protect against determines how you should go about it. If you would just like to hide it from being picked up by webscrapers, then I would imagine encrypting it and then decrypting it before you send would be sufficient.
If you would like to protect against anyone stealing it, then the only way is to have a server act as a proxy. You would make a call to an API which would then use your API key on the backend, away from the prying eyes of users. Your backend API would then just return to the user the response from fusioncharts.

Can't create working Shared Access Signature for Azure Files

I need to create a SAS so I can create an Azure SQL Extended Event session. The event session needs a file data storage target via SAS and I can't create one that works. Here's what I've tried:
Identified a storage account that's not blob; just general. I'm pretty sure I need general so I can create files directly.
Created a file share therein.
Using azure storage explorer, right clicked on that file share and selected, "Get Shared Access Signature."
Checked Read, Write, List and created.
This gives me the URL https://mystorageacct.file.core.windows.net/xevents?st=2018-12-25T16%3A29%3A51Z&se=2018-12-29T16%3A29%3A00Z&sp=rwl&sv=2018-03-28&sr=s&sig=mysig
If I just try to follow this URL or create a CloudFile object with it in code, I get the oft-seen error, Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. Signature did not match. String to sign used was rwl 2018-12-25T16:29:51Z 2018-12-29T16:29:00Z /file/cs7f0fbc5104d4ax435dx883/$root 2018-03-28
Tried adding in comp=list&restype=container as suggested here. No joy.
Ensured I have no access policy in use.
Went to the azure portal and created a different SAS at the storage account level (couldn't see a way to create it on the file share). That gave me this "File service SAS URL": https://mystorageacct.file.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2018-12-30T01:25:16Z&st=2018-12-26T17:25:16Z&spr=https&sig=mysig
If I try that URL I get Value for one of the query parameters specified in the request URI is invalid. I don't know which parameter is in question, they look fine to me, but I don't know what the value srt=sco indicates. Based on this doc srt is resource type, but I don't know what the value sco indicates.
Very confused, looking for suggestions.
For any future readers, extended event sessions confusingly (because they write a file) require blob containers, not general/file/queue containers. At least I could only get them to work that way.
You are probably confused by how the SAS URLs are presented. In fact, the SAS URLs you got just provide examples of how to use the SAS token, they can't be used directly. Hence you saw those errors occur.
Service-level SAS URL, i.e. the one you got from Storage Explorer.
It's in the format of fileEndPoint/fileShareName?SASToken. The SASToken gives us permission to operate on all files inside the specified file share. To leverage the token, we need to add fileName in the URL, i.e. fileEndPoint/fileShareName/fileName?SASToken.
comp=list&restype=container is to list blobs in Blob Container, not for File Share.
Account-Level SAS URL, the one you got form Azure portal.
It's in the format of fileEndPoint/?SASToken. Likewise, we need to complement the URL to make it valid, i.e. fileEndPoint/fileShareName/fileName?SASToken. Note that this SASToken has all permission on all Storage resources because all choices are checked.
sco means we have permission to operate on service, container, and object, which indicates the scope of permission, check doc for details.
I am not familiar with Azure SQL Extended Event session, but if you only need to work with files inside one file share, 1st is enough.

error: Failed to run the post merge process

I'm trying to generate documents using conga composer 8 from apex code but its failing with error Failed to run the post-merge process. I have looked into url and its same as the one I used initially in another salesforce org. I couldn't find any help online or on conga-composer form.
Here is my conga endpoint URL:
https://composer.congamerge.com/Composer8/Index.Html? sessionId=00D41000000dorw!ARQAQKbinH5TXMR_70s3XCShQh5GuSVdrFcq0Fg9OidZLo9MLxzWSby8QY1B4xM8e72DPawVziclnXBjTzpG41RiCAPKQqOt
&serverUrl=https://na35.salesforce.com/services/Soap/u/29.0/00D41000000dorwEAA
&id=a1J410000012BwS
&TemplateId=a0C41000000kg5GEAQ
&APIMODE=13
&ESAgreementName=Contract+for+Test
&queryid=a0441000001PwI7AAK,a0441000001PwICAA0
&ESSignatureType=2
&ESSignatureOrder=2
&ESVisible=1
&ESCustomField=cldocgen__App__c
&ESCustomFieldValue=a1J410000012BwSEAU
&ESRecipient1=00541000000Ke9pAAC
&ESRecipient2=003410000078zVbAAI
&ESRecipient3=003410000078zVhAAI, Method=GET]
Any insight what might be causing this issue.
I had the same problem and was able to solve it using permissions. In this case make sure the user id whose sessionID is passing to Conga has the correct CRUD access to the primary object in your conga call (id=a1J410000012BwS). My guess is that this is something to do with Conga not being able to write the attachment back to salesforce.
Apart from what Greg has mentioned, there are 2 more observations for this error:
Under Email Administration -> Deliverability -> Access to Send Email (All Email Services) should be set to All email.
In case you are using the EmailTemplateId parameter then the classic email template must be available for use.
Also mostly this error is also because of some discrepancy in the URL.