You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 13, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 13, 2022. It is now read-only.
Loading kube-config - issue with python base64.b64decode() function #128
This script uses base64.b64decode() function to decode 'id-token' from kube-config file.
Even though my base64 string is ok( Golang API decodes it without any issue),
the python decoder always returns 'incorrect padding' error message. I have tried with PY3.5, PY3.7 and PY3.8, none works.
Here is my base64 string: eyJpYW1faWQiOiJJQk1pZC01NTAwMDE5IiwiaXNzIjoiaHR0cHM6Ly9pYW0uYmx1ZW1peC5uZXQvaWRlbnRpdHkiLCJzdWIiOiJ2aXNoYWwueWFkYXZAeHh4eC5jb20iLCJhdWQiOiJrdWJlIiwiZ2l2ZW5fbmFtZSI6IlZpc2hhbCIsImZhbWlseV9uYW1lIjoiWWFkYXYiLCJuYW1lIjoiVmlzaGFsIFlhZGF2IiwiZW1haWwiOiJWaXNoYWwuWWFkYXZAeHh4LmNvbSIsImV4cCI6eHh4eHgsInNjb3BlIjoiaWJtIG9wZW5pZCBjb250YWluZXJzLWt1YmVybmV0ZXMiLCJpYXQiOjE1NTQ0ODMyODQsInN1Yl8xNzU4NTg1ZTA3MjQ1NGU5NmEwNGQ2YmMxN2RkOWNmIjoidmlzaGFsLnlhZGF2QHh4eHguY29tIiwiZ3JvdXBzXzE3NTg1ODVlMDd4eHh4eDZhMDRkNmJjMTdkZDljZiI6WyJFZGl0IGNvbXBhbnkgcHJvZmlsZSIsIkFkbWluaXN0cmF0b3IiLCJWaWV3IGFjY291bnQgc3VtbWFyeSIsIlVwZGF0ZSBwYXltZW50IGRldGFpbHMiLCJSZXRyaWV2ZSB1c2VycyIsIkdldCBjb21wbGlhbmNlIHJlcG9ydCIsIk9uZS10aW1lIHBheW1lbnRzIiwiQWRkIGNhc2VzIGFuZCB2aWV3IG9yZGVycyIsIkxpbWl0IEVVIGNhc2UgcmVzdHJpY3Rpb24iLCJFZGl0IGNhc2VzIiwiVmlldyBjYXNlcyJdfQ
changed the title [-]Issue with python base64.b64decode() [/-][+]loading kube-config --- Issue with python base64.b64decode() function[/+]on Apr 5, 2019
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
This was fixed by #79. The fix has been included in 10.0.0 release. We are cherry-picking the fix to release-8.0 and release-9.0 as well.
/remove-lifecycle stale
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
This script uses base64.b64decode() function to decode 'id-token' from kube-config file.
Even though my base64 string is ok( Golang API decodes it without any issue),
the python decoder always returns 'incorrect padding' error message. I have tried with PY3.5, PY3.7 and PY3.8, none works.
Here is my base64 string:
eyJpYW1faWQiOiJJQk1pZC01NTAwMDE5IiwiaXNzIjoiaHR0cHM6Ly9pYW0uYmx1ZW1peC5uZXQvaWRlbnRpdHkiLCJzdWIiOiJ2aXNoYWwueWFkYXZAeHh4eC5jb20iLCJhdWQiOiJrdWJlIiwiZ2l2ZW5fbmFtZSI6IlZpc2hhbCIsImZhbWlseV9uYW1lIjoiWWFkYXYiLCJuYW1lIjoiVmlzaGFsIFlhZGF2IiwiZW1haWwiOiJWaXNoYWwuWWFkYXZAeHh4LmNvbSIsImV4cCI6eHh4eHgsInNjb3BlIjoiaWJtIG9wZW5pZCBjb250YWluZXJzLWt1YmVybmV0ZXMiLCJpYXQiOjE1NTQ0ODMyODQsInN1Yl8xNzU4NTg1ZTA3MjQ1NGU5NmEwNGQ2YmMxN2RkOWNmIjoidmlzaGFsLnlhZGF2QHh4eHguY29tIiwiZ3JvdXBzXzE3NTg1ODVlMDd4eHh4eDZhMDRkNmJjMTdkZDljZiI6WyJFZGl0IGNvbXBhbnkgcHJvZmlsZSIsIkFkbW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