Is there a way of querying Google Secrets Manager? - google-cloud-platform

Google Secret Manager supports setting labels. The UI supports filtering by name or label. However, I can't find a way of searching secrets in any sane way other than scanning them all. Am I missing something?
link to REST API:
https://cloud.google.com/secret-manager/docs/reference/rest/v1/projects.secrets/list

There is a query filter language you can use with the Google Secret Manager Rest API. It took a while to track this down, but the filter language is documented here.
https://cloud.google.com/secret-manager/docs/filtering
With this you can pass a url parameter filter=somecondition - for example
?labels.environment=production

Related

Cannot find Google Cloud Vision APIs

This question might be borderline for here.
I am trying to get the API key for Google Cloud Vision. However, when I go to create an API key, that is not shown (only OAuth and serviced accounts are available).
How can you go around it?
Click the link "Credentials in APIs & Services" to create API Keys.
You'll need to choose the correct project but the link should be:
https://console.cloud.google.com/apis/credentials
API Keys are Project not API specific; the name makes this confusing, admittedly.
However, once you create a Project-specific API key, you can edit and should add API restrictions and you can select the Vision API there.
I encourage you to add Application restrictions too.
CAUTION You want to make the restrictions as restrictive as you possibly can. API Keys are bearer tokens and, by their nature, are often distributed. Anyone that holds the API Key (token) can access the project resources that its use confers.
You can use a Google Cloud console API key to authenticate to the Vision API. Follow the instructionsVision API -> Using an API key and Creating an API key
You can create a Key following the next instructions:
First you need to create a Service account as:
Then you need to specify the Service account name and ID, and you can add a description such as:
You click create and continue then you need to add the roles to the service account that you need just to show you I added Editor role:
Then I clicked done, and it created me a Service account then you need to click on the email of the service account.
There is an option menu on the top you click on Key, and then you click on ADD KEY.
Finally you have to choose the Key type that can be JSON or P12.

GSuite Vault API: Any way to get a list of users on hold programmatically?

Currently, the Google Vault API does not provide a way to get a report of all users in a G-Suite tenant or domain who are on hold in one or more matters. This information is currently available only via the admin interface for Google Vault under Reports/User Holds. It would be great to be able to obtain this report via an API call in JSON format rather than only via the admin UI. Am I missing something or is this functionality already available?
Respectfully, please keep in mind that suggesting that I perform API operations to search all matters and iterate through the users on hold in each matter to obtain this information is not the answer I am looking for. There should be a quicker, more efficient way to get this information since such a report is already available via the UI. I am simply asking if there is a way to get this same information programmatically via the APIs/automation. Thank you in advance.
Unfortunately, Vault API does not have a method for that. The only way to retrieve this information is to list all matters and iterate through them, as you already mentioned.
File a feature request:
It's not uncommon for a feature to be present only in the UI. If you want to see this implemented on the API, I'd suggest you to report it on Issue Tracker's Vault component.
I looked through the issues of this component, and it looks like this hasn't been requested yet. There's currently a somewhat related feature request, but not exactly what you're looking for:
Audit reporting functionality
Update:
The original poster filed a feature request in Issue Tracker. I'm add this to the answer in order to give it more visibility.
To anyone who would like to see this feature implemented in the future, I'd suggest starring the issue (star on the top-left) in order to help prioritizing it:
Vault API: Need API method to return list of all users who have active holds as available in Vault UI

google people api - is there any way to add developer only data?

It seems the google people api does not support extended properties (user defined fields are supported but not extended properties) - see https://issuetracker.google.com/issues/113346916
Given this, is there any way to add developer only data to a person object? I.e. some way to attach data via the api that the user cannot view or modify via their Google contacts?
Reply from Google dev support: Extended properties are now exposed as ClientData.
See https://developers.google.com/people/api/rest/v1/people#Person.FIELDS.client_data

AWS Cognito Admin GetUser with associated groups

I am using aws cognito sdk with .net core 3.1 webapi. The issue is, I have to display users info as well as user groups. ListUserApi https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUsers.html doesn't return users group information. According to the docs I have to call other api ListUserInGroups (https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUsersInGroup.html) but as I need both information on single table. This call would be really expensive for me. Is there any other api which returns user's profile info as well as user group info. I tried to find one but couldn't
Also one other question do aws cognito api provied sorting functionality? Like sort by name of email? I can only see filtering option but not sorting.

Authorizing the BlueJeans API with a Django app

I'm trying to make a Django app automatically send invites to BlueJeans video conferences using its API (https://bluejeans.github.io/api-rest-meetings/site/index.html). However, I'm finding it not so straightforward to set this up, and their customer support staff seem to not all be completely familiar with these features either.
When you request to enable API access in BlueJeans, the customer support enables an "OAuth Access" tab with a form which allows you to create an app with a name, description, and 'app key':
My question is: what should I fill in for the "app key"? (I've browsed the OAuth 2.0 RFC but so far haven't been able to apply it to solve this).
From BlueJeans' API documentation (which is shared as a PDF to developers who enable the API for their enterprise account), you can simply 'make up' an 'App Key' on the spot, and BlueJeans will create a corresponding 'App Secret'.