Cannot find Accesskey Secret Alibaba Cloud - alibaba-cloud

I want to install maxcompute command line tool ot odps command line tool, but cannot get Accesskey Secret for the account.
I am following this tutorial: https://www.alibabacloud.com/getting-started/projects/getting-started-with-alibaba-cloud-maxcompute?spm=a3c0i.8276372.1196449.211.5cbc6ed63Re8ew

For an alibaba cloud root account access key, you can create one in the console, Goto the top right corner and select security console, here you either copy an existing key and secret pair or create a new one, refer to the following documentation link:
Create an AccessKey - General Reference| Alibaba Cloud
https://www.alibabacloud.com/help/doc-detail/53045.htm

I wish you to know two things.
Accesskey Secret only could download once, you could create in the security console.
if you lost the excel or the code, you need recreate a new one.
I do not recommend you to use root accesskey ,it is not safety. please create one IAM role give limited access.

Related

How to integrate key vault with Bot composer

I want to make an http request from bot composer but one thing to pass while making http request needs to be kept a secret. So I want to fetch that value from key vault. Can someone tell how to integrate bot composer with key vault.
I'll assume you are using Azure to run the bot, so I'll answer with that in mind. Otherwise let me know and I can expand the answer.
Take the secret from the settings of the bot. It's just like how you access turn.activity.text, but using settings scope instead of the turn scope. So: settings.apiSecret.
Local Env
Now in development, local environment, you can just put the secret in the settings file.
In Azure
When you deploy to your azure app service, you can use Key Vault References in the Configuration blade. Remember you need to give the app service Secret Get permission to that Key Vault.
This is the easiest way since you don't need to write code to query KeyVault via the API.
From DevOps to Azure
There's a way to get the secret in the pipeline, but I believe this is not something you need in this scenario, you just want to set the variable in the App Service. So in the App Service Deployment task, under Application and Configuration settings -> App Settings: you can add the same thing you'd put in the Configuration blade in the azure portal.
So you can add to the textbox: -apiSecret #Microsoft.KeyVault(SecretUri=https://myvault.vault.azure.net/secrets/mysecret/) or click on the button with the elipsis on the right and enter it on the form

Recaptcha secret key, where is it in my Google Cloud Recaptcha account?

I am attempting to setup a google recaptcha on my site and the plugin I am using is asking for the site key AND a secret key. No idea what a secret key is, I cannot find it in my settings anywhere in Google Cloud. Any help is greatly appreciated.
Try going to https://g.co/recaptcha/v3 and use that UI to set up your reCaptcha. With that process I was provided with two keys, a site key for the frontend and a secret key for the backend.
Google seems to have a couple of different ways to set up recaptcha and the documentation is out of sync with reality so there are many dead ends to get lost in. I spent a long time in the Google Cloud Platform and it was useless.
Even I faced the same confusion after trying to implement it by reading some online tutorials. The first confusion was why my Google Cloud console called it CAPTCHA "Enterprise". But I will leave that exploration to you, as it doesn't matter in our case.
But I was finally able to get it to work. I found the secret under,
Legacy reCAPTCHA secret key
It is now possible to find your secret key in the Google Cloud Console
If you go to the details page of your site key, the secret key will be available at the bottom.
The ReCAPTCHA Enterprise version does not use a secret key. You can still use recaptcha 3 or 2 and generate a api and secret key here:
https://www.google.com/recaptcha/admin/create
Enterprise ReCaptcha is a bit different than the standard one.
Login to Google cloud platform and select your project from the top menu.
Search for reCAPTCHA Enterprise in the search box.
On that screen you can definite Enterprise keys (public site key) and their settings (allowed domains, etc...)
In order to create a secret key, go to: APIs and services menu. Select 'Credentials' and define a new API key (secret key).
Hope that helps.

Use a service account to get the list of users from Google domain

Hello all.
I have been assigned the task of fetching unanswered emails from the inbox of each member of our Google domain using Spring Boot, but I haven't been able to do it.
In first place, I need the list of users from the domain. This can be achieved via Directory API (which cannot be enabled by that name in the Google Developer console, by the way. Looks like it belongs to Admin SDK or so).
What I have faced so far is this:
There are many related questions on SO, but most of them are outdated.
Java Quickstart for Google Directory API does not include an example using service accounts, and I want to use them because my app runs in a docker container, and using Oauth means I need to manually authorize it every time I deploy a new version or restart the container.
Google documentation makes reference to "API Reference" settings in Admin console, but I don't see that section there.
I am not storing credentials in a JSON file, I have them in an environment variable instead. I am doing this:
var inputStream = IOUtils.toInputStream(apiCredentials, Charset.defaultCharset()); //apiCredentials is a string with the JSON contents.
var credential = GoogleCredential
.fromStream(inputStream, httpTransport, JacksonFactory.getDefaultInstance())
.createScoped(Collections.singleton(DirectoryScopes.ADMIN_DIRECTORY_USER));
var directoryService = new Directory.Builder(httpTransport, JacksonFactory.getDefaultInstance(), credential)
.setApplicationName("My App")
.build();
var result = directoryService.users().list()
.setPageToken(pageToken)
.setDomain("my.domain")
.setMaxResults(10)
.execute();
After this, I get a 400 Bad request error, with no further description.
What am I doing wrong here?

How do I "logout" of parse command line?

I am using cloud code, and I have two Parse accounts. I have authorized the first Parse account, but I want to add cloud code to the new Parse account, but whenever I do Parse add, it automatically takes me to the list of apps with the parse account I have authorized, how do I pull up the apps from the other account?
According to the Parse Github Issues Page, there is no logout, but you can change the default key you're using by parse configure accountkey -d
Hope that helps!

Enable notifications / Watch a Google Play bucket to programatically download reports

There's a lot of new information regarding how to programatically download Google Play reports using gsutil tool. Google Play uses a bucket to store these reports, just like Google Cloud Storage does. I'm already able to download reports from Google Play bucket without a problem. For example:
gsutil cp gs://pubsite_prod_rev_<my project id>/stats/installs/installs_<my app id>_201502_overview.csv .
On the other hand, gsutil offers a feature to watch Google Cloud Storage buckets, so you can receive notifications every time an object in the bucket changes (gsutil notification watchbucket). I am also able to enable notifications in buckets created in my own Google Cloud projects.
The problem is, I'm not able to enable notifications in my Google Play bucket. Is it even possible? I get an AccessDeniedException: 403 Forbidden error when calling:
gsutil notification watchbucket -i playnotif -t sometoken https://notif.mydomain.com gs://pubsite_prod_rev_<my project id>
I've followed all the steps here, being specially careful with those regarding identifying a domain to receive notifications.
As I mentioned above, I'm already able to do all the process I need, but with my own buckets in Google Cloud, not with the Google Play bucket.
The Google Play project has been linked to a Google Cloud project. It did so automatically when I enabled Google Play API access (Google Play Developer Console -> Configuration (left menu) -> API access).
The Google Play project owner and my own Google Cloud project owner is the same.
This owner has successfully registered and validated the domain used to receive the notifications (following the example, I validated both just in case: notif.mydomain.com and mydomain.com, using https in the Google Webmaster Tools)
These domains have also been whitelisted in the Google Developers Console (left sidebar -> APIs & Auth -> Push).
I've successfully enabled notifications in my own Google Cloud buckets using either the project owner account or a service account I created. I've already tried using both (owner and a corresponding service account) in the Google Play bucket, without success.
Any ideas will be greatly appreciated. Thanks!
EDIT:
I had already followed the steps here, but using different procedures (as explained in the comment below). Following Nikita's suggestion, I tried to follow the steps using the same procedure.
So I configured gsutil (through gcloud) to use the owner account:
gcloud config set account owner-of-play-store-project#gmail.com
and while trying to grant full access to the service account, I encountered this error:
$ gsutil acl ch -u my-play-store-service-account#developer.gserviceaccount.com:FC gs://pubsite_prod_rev_my-bucket-id
CommandException: Failed to set acl for gs://pubsite_prod_rev_my-bucket-id/. Please ensure you have OWNER-role access to this resource.
So, I tried to list the default ACL for this bucket, and found:
$ gsutil defacl get gs://pubsite_prod_rev_my-bucket-id
No default object ACL present for gs://pubsite_prod_rev_my-bucket-id. This could occur if the default object ACL is private, in which case objects created in this bucket will be readable only by their creators. It could also mean you do not have OWNER permission on gs://pubsite_prod_rev_my-bucket-id and therefore do not have permission to read the default object ACL.
[]
Conclusion:
It really makes me think that, even using the project owner account, this account doesn't have the OWNER role on the Play Store bucket. This means ACLs can't be modified, not even listed, as well as notifications can't be enabled since, sadly, we don't really own the bucket.
At the moment, you cannot. Google Play owns these buckets, and end users do not have the bucket FULL_CONTROL access necessary to subscribe to Object Change Notifications.

Resources