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

Extend auth to secure chatops #2920

Merged
merged 31 commits into from
Oct 6, 2016
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
362a198
add service principal flag to auth model
tonybaloney Sep 23, 2016
7db97bf
add chatops_id to user model
tonybaloney Sep 23, 2016
5c78afe
add new options to the token auth API
tonybaloney Sep 23, 2016
55fb8c8
extend auth API for impersonation by username or chatops_id
tonybaloney Sep 23, 2016
9c90b80
when creating tokens, make the (weird) behaviour of creating a new us…
tonybaloney Sep 23, 2016
f0d94a1
Replace the `chatops_id` string with `nicknames` dict
emedvedev Sep 25, 2016
7c7f386
Make the code great again! Also pretty.
emedvedev Sep 26, 2016
0a9d45a
Merge pull request #1 from emedvedev/oauth
tonybaloney Sep 26, 2016
5b73c1a
updated tests for impersonation
tonybaloney Sep 29, 2016
4498b80
work on the tests
tonybaloney Sep 29, 2016
17b33f4
refactor the auth process
tonybaloney Sep 29, 2016
f587085
start a seperate test case
tonybaloney Sep 29, 2016
06a1bbd
rename pecan util module to stop import errors
tonybaloney Sep 29, 2016
554147c
fix import
tonybaloney Sep 29, 2016
e4229c0
decouple the auth handlers from the pecan structure
tonybaloney Sep 29, 2016
484e9c2
Merge branch 'oauth' of github.com:tonybaloney/st2 into oauth
tonybaloney Sep 29, 2016
4cbc0cd
fix first test
tonybaloney Sep 29, 2016
a5dbace
unit tests for the new handlers
tonybaloney Sep 30, 2016
038641e
moar tests
tonybaloney Sep 30, 2016
ea874df
pylint fixes
tonybaloney Sep 30, 2016
78f5e20
fix logging import
tonybaloney Sep 30, 2016
8729eea
final tests
tonybaloney Sep 30, 2016
52acd1e
linting fixes
tonybaloney Sep 30, 2016
ffa24e7
remove module execution shortcut
tonybaloney Sep 30, 2016
3c085dd
add a service user and remove unused import
tonybaloney Sep 30, 2016
3f04e4f
add impersonation to the proxy and standalone handlers
tonybaloney Sep 30, 2016
403b10f
rename to nicknames
tonybaloney Sep 30, 2016
6d3bea9
fix test by mocking lookup
tonybaloney Sep 30, 2016
08cc80b
forgot the auth param
tonybaloney Sep 30, 2016
13f87ff
rename local var
tonybaloney Oct 4, 2016
0037afd
kwarg mapping to field names, of course.
tonybaloney Oct 6, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test by mocking lookup
  • Loading branch information
tonybaloney committed Sep 30, 2016
commit 6d3bea94afd5f6a37222b6e0558416cd3d8a0533
3 changes: 3 additions & 0 deletions st2auth/tests/unit/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ def test_standalone_impersonate_user_not_found(self):
@mock.patch.object(
User, 'get_by_name',
mock.MagicMock(return_value=UserDB(name='auser', is_service=True)))
@mock.patch.object(
User, 'get_by_nickname',
mock.MagicMock(return_value=UserDB(name='anotheruser', is_service=True)))
def test_standalone_impersonate_user_with_nick_origin(self):
h = handlers.StandaloneAuthHandler()
request = MockRequest(60)
Expand Down