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

snow: Fix token reference in basic authentication #59315

Merged
merged 1 commit into from
Jul 22, 2019

Conversation

n3pjk
Copy link
Contributor

@n3pjk n3pjk commented Jul 19, 2019

SUMMARY

Basic authentication does not use tokens, only OAuth. ServiceNowClient constructor code had indent issue which attempted to initialize token regardless of authentication method.

Fixes #59299

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

service_now.py

ADDITIONAL INFORMATION

See #59299 for repro instructions.

@ansibot
Copy link
Contributor

ansibot commented Jul 19, 2019

@n3pjk this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. labels Jul 19, 2019
@ansibot
Copy link
Contributor

ansibot commented Jul 19, 2019

@n3pjk this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

@ansibot ansibot added module This issue/PR relates to a module. notification Notification category needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. docs This issue/PR relates to or includes documentation. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Jul 19, 2019
@n3pjk
Copy link
Contributor Author

n3pjk commented Jul 19, 2019

@Akasurde I rebased the branch, didn't see the changes from #59297 so I manually added all of those changes into this branch as well. The checks were cancelled, not sure why. There's no feedback from the console to go on. Any suggestions?

@Akasurde
Copy link
Member

@n3pjk I restarted the CI and now it is PASSED for this change. Let me know once you are ready for the change. Thanks.

@Akasurde Akasurde changed the title Fix token reference in basic authentication snow: Fix token reference in basic authentication Jul 20, 2019
@Akasurde Akasurde self-assigned this Jul 20, 2019
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Jul 20, 2019
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jul 20, 2019
* Fix OAUTHClient logic
* Add Env variable support for snow modules

Fixes: ansible#59299

Signed-off-by: Paul Knight <paul.knight@state.de.us>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@ansibot
Copy link
Contributor

ansibot commented Jul 20, 2019

@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Jul 20, 2019
@n3pjk
Copy link
Contributor Author

n3pjk commented Jul 22, 2019

@Akasurde If this patch fixes basic auth, there should be no errors referencing tokens when using basic auth, then this is ready to go. I have retested and OAuth is working correctly. We just need basic retested.

@Akasurde
Copy link
Member

@n3pjk Basic Auth works for me. Let me know once you are ready to merge this. Thanks.

@n3pjk
Copy link
Contributor Author

n3pjk commented Jul 22, 2019

In that case, it's ready to merge!

@Akasurde Akasurde merged commit 6531819 into ansible:devel Jul 22, 2019
@n3pjk n3pjk deleted the snow-59299-2 branch July 25, 2019 20:24
@ansible ansible locked and limited conversation to collaborators Aug 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. docs This issue/PR relates to or includes documentation. module This issue/PR relates to a module. notification Notification category support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

snow_record: 'NoneType' object has no attribute 'generate_token'
3 participants