Mandrill application - what is it and what does its api key do - mandrill

Mandrill has an application area where they allow you to add applications.
I added an application and got an API key. What do I do with it? I already have an API key from the SMTP & API Credentials tab. What's an "application"?

Application is any app you wrote by yourself or that came from any other provider. For example, it can be a webapp in your site. You can access Mandrill interface from API only by providing your key -- it is your "password".

Related

What does credentials.JSON do when working with Google API?

I'm fairly new to programming, I've just got the basics down in terms of object oriented programming and a little bit of databases. I was just wondering if anyone could give an in-depth explanation as to what Google's credentials.JSON file does when trying to use their API. I'm using visual studios and c# if that's important.
Google's credentials.JSON contains information about your application that will identify it to google. It also gives your application some information it needs in order to find Googles oauth server and use it.
You should be aware that there are three types of files. Web, native and service account. The files are designed for use with different types of applications.
A web application would use web credentials and the code designed for authorization with a web application
A native application would use native credentials and code designed for use with authorization of a native application.
An application which would be just for server to server communication between data the developer owns and does not need to access user information would use service account credentials and the code needed for authorization with a service account.
Below is the example of the oauth credentials used for a web application.
{
"web":{
"client_id":"450547033183-5uok2fl5u.apps.googleusercontent.com",
"project_id":"developer-info-2b41cd",
"auth_uri":"https://accounts.google.com/o/oauth2/auth",
"token_uri":"https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs",
"client_secret":"Fu8ZmTGOMvHjqQEseZE68hg",
"redirect_uris":[
"https://developer-info-2b41cd.firebaseapp.com/__/auth/handler"
],
"javascript_origins":[
"http://localhost",
"http://localhost:5000",
"https://developer-info-2b41c.firebaseapp.com"
]
}
}
client_id Identifies the client to google so they know which oauth client this is you can create more then one set of credentials per project.
project_id your project on Google developer console.
auth_uri The Url endpoint you will need to contact google to authorize
token_uri The uri end point you will need to request the initial token.
auth_provider_x509_cert_url The location of all the oauth certificates
client_secret think of this as the password for your client id.
redirect_uris Authorized urls where you would like the authentication to be returned to.
99% of this is used by Googles Oauth2 server to authorize both your application and the user attempting to login. If your interested in how Oauth2 works i suggest reading though some of the RFC's for Oauth.

Require secret key using google Oauth

I have a Web application using Google and Facebook signin.
I want to require the authentification by adding the secret key, so in the client side I can connect just using my own application and not any other application.
I did that in Facebook by adding the appsecret-proof parameter, enable
How I can do the same using google?
You can register a new set of "Web Credentials" for your application via https://console.cloud.google.com/apis/credentials and the client secret would be available there.
https://developers.google.com/identity/protocols/OpenIDConnect
https://developers.google.com/identity/protocols/OAuth2
https://developers.google.com/identity/sign-in/web/sign-in
The above describes how Google Oauth works and its configurations.

How to implement unique alphanum Authentication using Azure Mobile App Service?

How do i implement unique alphanum auth in my ios mobile app using azure, i sort of did this by inserting a unique alphanum value in one of the SQLServer database user tables and when the user enters the unique code in the UI i check in the backend if the value is valid and let him in, but how can i really restrict the tables to only Authenticated users in the database? I am also not able to make my app build using username and password in Azure Auth since it only supports AD,Microsoft,FB and Twitter. Can anyone help me in this regard?
unique-code-screenshot
permissions_screenshot
Be able to make my app build using username and password in Azure Auth
By default, as you said above, it only supports AD, Microsoft, FireBase and Twitter. So we need to do this by ourselves. We need to add authentication feature via writing code in backend project. There are two type of backend we can use: .NET and Node.js, for more information about backend SDK, we can refer to:
.NET Backend SDK
Azure Mobile Apps - Node SDK
how can i really restrict the tables to only Authenticated users in the database
We need to do this at Backend: Restrict permissions to authenticated users
Lee Liu just provided some common tutorials about Azure Mobile Apps. Based on my experience, you could build your custom provider instead of the build-in identity providers to implement your requirement.
I am also not able to make my app build using username and password in Azure Auth since it only supports AD,Microsoft,FB and Twitter. Can anyone help me in this regard?
Based on your description, I assumed that you are using the Authentication and authorization in Azure App Service. If the build-in identity providers could not meet your requirement, you could also build your own custom identity provider (e.g. username/password against your database,etc) and you could also leverage the features provided by App Service Authentication /Authorization (Easy Auth).
For achieving this approach, you could follow How to: Use custom authentication for your application for .NET backend. Moreover, you could follow adrian hall's blog about Custom Authentication for detailed tutorial. For NodeJS backend, you could follow 30 DAYS OF AZURE MOBILE APPS.

ADAL iOS Authentication to Azure Web API

Right now, I have a native azure app that my iOS app uses ADAL to authenticate to with no issues. I've added a Web API in azure and it's being managed by the Azure API Management resource. I have this API using an oAuth server that uses Azure AD for authentication (all created within the Azure API Management).
The issue I'm having is the oAuth token I'm receiving from my iOS App is not being accepted by my Web API. They are both using oAuth to the same Azure Active Directory. I tried changing in my iOS app, to use the Web API app client ID instead of the native app client ID. The issue then becomes during authentication, it needs a "client_secret" in the request. Looking at the ADAL iOS library, I'm not seeing a method to get a token that passes in a client secret as a parameter.
Scroll down to the Keys section, you will see the key as the client secret. They are used for calling the web api.
These two methods of authenticating the applications are referred to as interactive (user signs in) and non-interactive (app provides its own credentials). In the non-interactive mode, you must assign the service principal to a role with the correct permission. About the AAD authentication's more information, you could refer to: https://azure.microsoft.com/en-gb/documentation/articles/resource-group-create-service-principal-portal/

Authenticating to Google Cloud Endpoints as iOS app (not user with Google account credentials)

One of my iOS apps contacts one of my services using Google Cloud Endpoints and I would like to restrict access to that service to instances of the app.
I've followed instructions about adding authorization and have created an iOS client ID that is tied to my app's bundle id and app store id. I've now difficulties understanding this part of the instructions:
If your iOS app is making calls to an Endpoint that requires
authentication, you must Add a Sign-in Dialog to your iOS client.
I do not want my users to log in but instead I want my app to present its credentials to the service for authentication without user interaction. I thought since the client ID is (presumably cryptographically) tied to the client ID and bundle ID only the app is (somehow) able to do so and that the client ID would effectively serve like a service account.
Is this type of app (not user) authentication scenario supported by Google Cloud Endpoints (for iOS clients) or do I have to roll my own app authentication by passing some secret in the application-level protocol? Here are some earlier related (unanswered) questions for Android clients.
I have concluded for now that Google Cloud Endpoints allows authentication only based on Google account credentials. What I need is a credential for the entire app (not its users) akin to a service account or an API key.
I have used service accounts for server-to-server communication. It does not seem possible to create service accounts for an app (as opposed to a GAE application).
GTLService has a property APIKey. However, if my client sets it to a public access key (iOS key) that I created for my GAE application in Google Developer Console the server returns error Access Not Configured. Please use Google Developers Console to activate the API for your project but there is no (obvious) way for configuring non-Google APIs such as my service API.
So until further notice I will add an API key to my application-level API requests and check it in each #ApiMethod.

Resources