Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding test cases for public key based introspection #1343

Closed
wants to merge 8 commits into from

Conversation

sshniro
Copy link
Member

@sshniro sshniro commented Mar 26, 2020

Summary

Resolves #1276

This PR tests the public key based token introspection for OAuth plugin.

The private key used to sign the token present in the test case:

-----BEGIN RSA PRIVATE KEY-----
MIIBOgIBAAJBANW16kX5SMrMa2t7F2R1w6Bk/qpjS4QQhnrbED3Dpsl9JXAx90MY
sIWp51hBxJSE/EPVK8WF/sjHK1xQbEuDfEECAwEAAQJBALyYVE06B5YIPgfU0bjz
ABeM6Pyeseay2qqSpcuL3KVTsZKhFfB49KdhxOGo45SKboVoM1xqOHVUopCFkEeQ
Le0CIQDtrTeGb/388cSM/0YEZvIpE05tecOpAIcI/a6xkluPVwIhAOYvtIF4RDhs
4mGzzPHtvridP5p/PWXkTxiNHfl3esonAiAhb/ET1MWixFCmlXNAQ0tmQ/UQqcTB
DfXxad8d1D1VWQIgAlmIUS4GHEFYSkEInYucv8uzI4Oa/9hFym1eWfaTRU8CIChU
gZnTz8ErlpRAG9TXnsJsvYA7Q3jzaYCmsYxQc2gW
-----END RSA PRIVATE KEY-----

The token used in the test case is valid for 10years.

"bearer_only": true,
"scope": "apisix",
"public_key": "-----BEGIN PUBLIC KEY-----
MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANW16kX5SMrMa2t7F2R1w6Bk/qpjS4QQ
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot indent with tabs, because the OAuth fails due to extra tab characters in the key.

@sshniro
Copy link
Member Author

sshniro commented Mar 26, 2020

The PR fails with test case errors in Kafka Plugin!

@membphis
Copy link
Member

@sshniro please confirm you are using the latest master branch, the master branch is fine.

image

@sshniro
Copy link
Member Author

sshniro commented Mar 27, 2020

@membphis @moonming can we restart this job now?

@membphis
Copy link
Member

@sshniro please rebase your branch with master, I have fixed those bug today.

#1346
#1347

@sshniro sshniro closed this Mar 27, 2020
@sshniro
Copy link
Member Author

sshniro commented Mar 27, 2020

Closing PR due to rebase mistake.

@sshniro sshniro deleted the oauth-test branch April 4, 2020 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add more test cases for oauth plugin
2 participants