How to add an api key to the Credentials of Azure Automation Account? - api-key

I want to add an api key for my sendgrid account to Azure Automation account.
I did the search but no luck.
How should I do this? Thank you in advance!

You could add your api key in password and set a related username(it does not verify the connection between username and password) like below:
Usually we use get a credential with Get-AutomationPSCredential and get its username and password
$myCred = Get-AutomationPSCredential -Name 'MyCredential'
$userName = $myCred.UserName
$securePassword = $myCred.Password
$password = $myCred.GetNetworkCredential().Password
For now, you need only to get the password which is sendgrid api key.

Related

cannot able to connect/hit endpoint using apikey

not able to understand why it is not getting connected, passed everything as per documentation why getting Unauthorized, what else can i do
enter image description here
As per the documentation you should pass this as basic authentication and not api key
Set authentication as basic authentication and set username as apikey and password as eg djdkkslsllsksmsmz
https://cloud.ibm.com/apidocs/assistant/assistant-v2
In curl -u indicates username and password basic authentication

Auth login using express mysql to an existing wp accounts

im building a login pwa with react and node for a existing wp site, how can i check the pass provide by user when signin with the encrypt wp password generate when the user created the account through wp? thanks in advance
WordPress makes use of md5 encryption so if you can use the below package to encrypt the entered password and check for the user authentication.
https://www.npmjs.com/package/md5
var md5 = require('md5');
if(password == md5('secret')){
//true
}
else
{
//wrong password
}

Binding to Ldap Server using ldap_bind_s- Can we authenticate using usertoken rathen than username and password

I use ldap_bind_s to bind to ldap server.
example:
SEC_WINNT_AUTH_IDENTITY *pSecIdentity;
ldap_bind_s( pLdapConnection, // Session Handle
NULL, // Domain DN
(_TCHAR*)pSecIdentity, // Credential structure
LDAP_AUTH_NEGOTIATE)
pSecIdentity is filled with username and password.
But the problem is i want to do the same with PKI users where i dont have username and password instead a user token.
So how to proceed with this scenario.
Are there any Structure to provide usertoken instead of username/password to authenticate?
Check if this helps
Not very sure but looks promising
https://pkienthusiast.wordpress.com/2011/09/16/apache2-pki-certificate-authentication-and-ldap-authorisation-example-2/

Api google adwords - client_secret for oAuth2.0

I have a problem with api adwords. I don't have client_secret from code.google.com/apis/console.
I created project and I add API Access for my application but i don't see client_secret in box Service account.
I have Client ID, Email address, Public key fingerprints, private key, and client_secret.json. In api adwords for php is config file auth.ini:
[OAUTH2]
; If you do not have a client ID or secret, please create one of type
; "installed application" in the Google API console:
; https://code.google.com/apis/console#access
client_id = "INSERT_OAUTH2_CLIENT_ID_HERE"
client_secret = "INSERT_OAUTH2_CLIENT_SECRET_HERE"
...
But I don't have client_secret.
What i did wrong? or could give me any suggestions?
The PHP application you are trying to use probably does not work with service accounts.
In order to get a client secret you have to create a client id of type "Web application".

WCF UserNameOverTransport best practices to store user name and password

In my client application I have to use web service UserNameOverTransport, so I need in client set username and password like:
client.ClientCredentials.UserName.UserName = "account";
client.ClientCredentials.UserName.Password = "password";
Is it some best practices where store username and password?
From my point of view it isn't good idea to store credentials in config file.
[Update]
When I asked this question I though that WCF provide some standard ability to store credentials in config file or have ability to setup with help of endpoints behaiviours.
The example which I looked for is solution by the following link:
http://blog.shutupandcode.net/?p=22
If you want to store credentials in the app.config/web.config, you can encrypt them using the ProtectedData class or a ProtectedConfigurationProvider. See the following links for more info (ordered from least detailed to most):
http://geekswithblogs.net/afeng/archive/2006/12/10/100821.aspx
http://weblogs.asp.net/jgalloway/archive/2008/04/13/encrypting-passwords-in-a-net-app-config-file.aspx
http://msdn.microsoft.com/en-us/library/89211k9b%28v=vs.80%29.aspx
http://msdn.microsoft.com/en-us/library/53tyfkaw%28v=vs.80%29.aspx
You do not need to store your username and password in config. What you usually store in config are client settings, like endpoints, behaviours and security settings.
Username and password should be set from inside the code, like you have shown:
client.ClientCredentials.UserName.UserName = "account";
client.ClientCredentials.UserName.Password = "password";
It's completely up to you where you will get these values from and how you are going to secure it