cloudendpoints / endpoints-management-python

A Python library for managing API services using Google's Service Control APIs
Apache License 2.0
19 stars 22 forks source link

Adding support for API key restrictions for iOS and Android #28

Closed imeier closed 7 years ago

imeier commented 7 years ago

This pull request adds support for api key restrictions for iOS and Android, as reported here: https://github.com/cloudendpoints/endpoints-management-python/issues/27.

The changes were based on information provided via the following discussion: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/google-cloud-endpoints/I-u3sAUU3Ts.

This code has been successfully deployed to a test GAE project, and the api calls are now accepted for api keys restricted to an iOS bundle identifier, and keys restricted to an Android package name and certificate fingerprint, provided the correct headers are sent in the request.

Thanks, Ian

googlebot commented 7 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


codecov-io commented 7 years ago

Codecov Report

Merging #28 into master will decrease coverage by 0.06%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
- Coverage   96.02%   95.95%   -0.07%     
==========================================
  Files          22       28       +6     
  Lines        2890     2917      +27     
==========================================
+ Hits         2775     2799      +24     
- Misses        115      118       +3
Impacted Files Coverage Δ
google/api/control/wsgi.py 93.33% <ø> (ø) :arrow_up:
google/api/control/operation.py 100% <ø> (ø) :arrow_up:
google/api/control/check_request.py 98.9% <100%> (+0.03%) :arrow_up:
google/api/control/label_descriptor.py 100% <100%> (ø) :arrow_up:
google/__init__.py 57.14% <0%> (-42.86%) :arrow_down:
google/api/auth/caches.py 92.3% <0%> (-6.72%) :arrow_down:
google/api/gen/__init__.py 100% <0%> (ø)
google/api/control/__init__.py 100% <0%> (ø)
google/api/auth/__init__.py 100% <0%> (ø)
google/api/control/vendor/py3/__init__.py 100% <0%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fac04d9...e0fbb04. Read the comment docs.

imeier commented 7 years ago

I signed it!

googlebot commented 7 years ago

CLAs look good, thanks!

skylinetech-team commented 6 years ago

hi, is the same fix been applied to java as well ? we are seeing the same issues with calling endpoint service that hosted on google cloud from our iOS app - even with specified x header

tangiel commented 6 years ago

It was recently added to Java. Make sure you're using 1.0.7 of endpoints-management-control.

skylinetech-team commented 6 years ago

Yup, thanks - just did an update earlier today / works as expected !

On Thu, Mar 1, 2018 at 1:47 PM Daniel T notifications@github.com wrote:

It was recently added to Java. Make sure you're using 1.0.7 of endpoints-management-control.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cloudendpoints/endpoints-management-python/pull/28#issuecomment-369690846, or mute the thread https://github.com/notifications/unsubscribe-auth/AgnYH3fq0hEUjKEfa4P4huQKTW1eOeIiks5taEJSgaJpZM4M3i6O .