How can you lock down the API Explorer in Cloud Endpoints so that it only works with a specific Gmail account (e.g. your console.developers.google.com email for example)?
Someone told me I could use a security-constraint in my web.xml file of my Cloud Endpoints project like so:
<security-constraint>
<web-resource-collection>
<web-resource-name>admin</web-resource-name>
<url-pattern>/admin/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
But in the Using Auth with Endpoints docs it says:
"You must specify Endpoints auth following the directions provided on this page. Note that you cannot set a user login requirement following the instructions provided under Security and Authentication to configure the web.xml file, because this will result in a deployment failure."
So you can't do that...
Anyone know how you can restrict the Oauth2 authentication to a specific gmail account in the API Explorer? Because be default, you can sign in with any gmail account which will make you Oauth2 authenticated and then you can execute any API methods that use Oauth2 with the com.google.appengine.api.users.User user parameter in their methods.