boto/botocore — pull request #208 by garnaat (2014-01-14 14:47:23+00:00)
Title: Allow anonymous calls on an operation-by-operation basis.

This pull request adds the ability to make anonymous (unsigned) requests. The motivation for this PR is to allow the STS operations AssumeRoleWithSAML and AssumeRoleWithWebIdentity to be called without having any credentials defined. These operations do not require, and in fact ignore, any authentication and it's quite likely that if a user wants to make these calls they would prefer to do it without any AWS credentials defined in their environment.

This required more changes than I expected.

* A new attribute called ``no_auth`` was added to the two operations in question in the ``sns.extra.json`` file.
* The ``endpoints.py`` code was changed so that the ``make_request`` method checks for a value of ``True`` on the ``no_auth`` attribute of the operation and only calls ``add_auth`` if the endpoint has an auth class and the operation's ``no_auth`` is not True.
* The ``auth.py`` code was changed to move the check for credentials into the ``add_auth`` method rather than in the constructor. This is necessary because the auth is associated with the endpoint itself and not the operation. So, if a user has no credentials defined, they should still be able to create an endpoint and only get an error if they try to call an operation that does not have the ``no_auth`` attribute.
* This also adds some STS-specific tests and also some additional tests in ``test_endpoints.py``.

Fixes #206.