Box API v2 Create a Shared Link for a File with permissions.download config return 500 Internal Server Error - box-api

Here is the params that I sent along with create shared link and got "Internal Server Error"
{"shared_link":{"access":"Collaborators","permissions":{"download": true}}}

This is a case of (1) bad documentation and (2) a bad error response.
You're seeing an error because the permissions parameter can only be used with the Open and Company access types*.
On (1) we should have this documented (I just updated our documentation to reflect this). On (2) we should be returning a more descriptive error (e.g. a 400 Bad Request and a message of " doesn't work with this access type. This is also in our development pipeline) "
*If you're really curious, it doesn't work with the Collaborators type because it's expected that the permissions set by the collaboration for each user will define their shared link access. Not the most straightforward thing, I understand.

Related

HPP Incorrect hash

I send a request to the sandbox to "Pay By Link".
URL: https://pay.sandbox.realexpayments.com/pay
I get an error in response.
{"errors":[{"resultCode":508,"internalErrorCode":61000,"errorMessage":"Incorrect hash. Please check your code and the Developers Documentation."}]}
The hash is calculated correctly (the values obtained through the SDK and calculated manually are the same).
This is possible with the wrong shared secret.
I use the values of the MerchantId and the SharedSecret in my account on the https://developer.globalpay.com/gp_api_credentials/
(My Account->Ecomm API Credentials->Sandbox Credentials)
How to fix the error?
Can i change the "Ecomm API Credentials->Sandbox Credentials" ?
The server reply is often completely wrong, so don't believe the error message it tells you. Remove all optional config field values (such as CardStorageEnabled) and try again. Then it should work, and after that you can re-enable the optional fields one by one to see which one causes the error.

Data Studio Connector can't get access token for BigQuery Service Account: Access not granted or expired

I'm trying to make a community connector to connect my database in BigQuery to data studio with the service account that I hooked up as the Owner/DataViewer/JobUser of the BigQuery project. I know that the service account works when connecting to BigQuery because I've tested it elsewhere. I copied from the connector code from this tutorial (https://developers.google.com/datastudio/solution/blocks/using-service-accounts) almost exactly, replacing the SQL string with my query and adding some different query parameters. I also stored the service account's credentials in my script properties by pasting the json object and storing it like:
var service_account_creds_obj = {
"type": "service_account",
"project_id": ...
...
}
scriptProperties.setProperty('SERVICE_ACCOUNT_CREDS', JSON.stringify(service_account_creds_obj));
However, I always get stuck in the flow when my getData function calls getOauthService().getAccessToken(), which doesn't ever successfully return. When I create a report using the connector, I get this error: "Access not granted or expired." I can't find the documentation for getAccessToken and I'm having trouble understanding why it won't terminate. I can see that it doesn't return because a console.log immediately before that line displays but it never gets to the log on the next line. Then my try-catch block catches the error that I'm seeing. Note that my getOauthService function is exactly the same as the one from the documentation/tutorial example, except that I've played around with the input text in the call to createService. That input text shouldn't really matter though right?
Please, I've been trying to debug this for hours, but the documentation on this is pretty horrible, and it's really hard to debug since the flow of the code is handled in the background and stackdriver logging is really buggy.
I figured out my problem. The documentation posted above said to set the OAuth2 scope to https://www.googleapis.com/auth/bigquery.readonly. However, I naively included
"oauthScopes": ["https://www.googleapis.com/auth/bigquery.readonly"]
in my manifest file. Meanwhile, the code I copied over from the documentation already included this line:
.setScope(['https://www.googleapis.com/auth/bigquery.readonly']);
So I'm not sure exactly why this caused a problem. But it must have prevented the OAuth2.createService function from properly getting set.

com.hierynomus.mssmb2.SMBApiException: STATUS_NETWORK_NAME_DELETED exception

I am getting the following error stack trace, when I am trying to connect an SMB share that I connect using the library most of the time, so yes the code mostly works but sometimes not. I could not try anything yet because I do not have any idea about what can be wrong, the share config, the network or the code, no idea.
com.hierynomus.mssmb2.SMBApiException: STATUS_NETWORK_NAME_DELETED (0xc00000c9): Authentication failed for 'your-user' using com.hierynomus.smbj.auth.NtlmAuthenticator#565d98da
com.hierynomus.smbj.connection.Connection.authenticate(Connection.java:182)
Here is my SmbConfig and I am using the 0.9.1 of smbj.
SmbConfig config = SmbConfig.builder()
.withMultiProtocolNegotiate(true)
.withSigningRequired(true)
.withDfsEnabled(true)
.build();
Here https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb/6ab6ca20-b404-41fd-b91a-2ed39e3762ea it gives more information about 0xC00000C9 - STATUS_NETWORK_NAME_DELETED exception and says
The network name specified by the client has been deleted on the
server. This error is returned if the client specifies an incorrect
TID or the share on the server represented by the TID was deleted.
Should I think something happened to the share on the windows server during the execution of the code?

KeePass, GoogleSync: "Error occurred while sending a direct message or getting the response"

When using KeePass with the GoogleSync plugin (to sync the keypass db with Google Drive), I somehow messed up my config and received this message on every sync attempt:
Error occurred while sending a direct message or getting the response
I think what I actually did was try to switch my Google API credentials (from one API key to another)
The user config saves a Google auth key. In my case I changed the API credentials I wanted to use, but it could become corrupted in other ways and there doesn't seem to be a mechanism in KeePass/GoogleSync to rectify it.
Exit KeePass
Delete (or backup to a different name) the file %LOCALAPPDATA%\Dominik_Reichl\KeePass[...]\[version]\user.config
Restart KeePass and it'll regenerate it with the correct config
Found my reference here:
http://sourceforge.net/p/kp-googlesync/discussion/general/thread/5dc763ba/

Configuring Fed-lab.org as Identity Provider

MY AIM : I am creating a Service provider at my local server using opensaml-java latest library from shibboleth.I want a Test IdP.I chose https://fed-lab.org/ . There is no clear procedure for this configuration also
1.I have created Metadata programmatically using opensaml.
I need to check whether my metadata is correct according to its standard schema.How can i check this?
2.I have registered my SP at https://fed-lab.org/ site after logging in.
3.I have downloaded the Identity Provider from https://fed-lab.org/online/identity-provider-metadata/
It has two IDPSSODescriptors.
In that SIngleSignOnServices are
1.https://openidp.feide.no/simplesaml/saml2/idp/SSOService.php and
2.https://fed-lab.org/simplesaml-test/module.php/fedlab/SingleSignOnService.php
I am using HTTP-Redirect binding
I have created the AuthnRequest message first . then did , deflate , base64encoding , URL encoding as per specification of SAML
https://openidp.feide.no/simplesaml/saml2/idp/SSOService.php?SAMLRequest=processedAuthnRequest
I am trying to access this URL , But I am getting nothing Response from the site.
WHere am I wrong ? please Let me help to figure it out.
Can u provide Test IdPs where there is a clear way(documentation) to do the configuration.
There is a very simple Idp at http://stubidp.kentor.se that doesn't require any kind of registration. Just enter your acs url and a subject nameid to send an unsolited Saml2Response.
It won't let you test everything (yet), but it can get you started on receiving a basic message and handling that.