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

allow configurable fail/misisng password matching #58931

Open
wants to merge 6 commits into
base: devel
from

Conversation

Projects
None yet
4 participants
@bcoca
Copy link
Member

commented Jul 10, 2019

sudo is the start, but should include other plugins

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

become

bcoca added some commits Jul 10, 2019

@ansibot

This comment was marked as resolved.

Copy link
Contributor

commented Jul 10, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/plugins/doc_fragments/become_matches.py:1:0: syntax-error invalid syntax (<unknown>, line 1)

The test ansible-test sanity --test ansible-doc --python 2.6 [explain] failed with 1 error:

lib/ansible/plugins/become/sudo.py:0:0: missing documentation (or could not parse documentation): invalid syntax (become_matches.py, line 1)

The test ansible-test sanity --test ansible-doc --python 2.7 [explain] failed with 1 error:

lib/ansible/plugins/become/sudo.py:0:0: missing documentation (or could not parse documentation): invalid syntax (become_matches.py, line 1)

The test ansible-test sanity --test ansible-doc --python 3.6 [explain] failed with 1 error:

lib/ansible/plugins/become/sudo.py:0:0: missing documentation (or could not parse documentation): invalid syntax (become_matches.py, line 1)

The test ansible-test sanity --test ansible-doc --python 3.5 [explain] failed with 1 error:

lib/ansible/plugins/become/sudo.py:0:0: missing documentation (or could not parse documentation): invalid syntax (become_matches.py, line 1)

The test ansible-test sanity --test ansible-doc --python 3.7 [explain] failed with 1 error:

lib/ansible/plugins/become/sudo.py:0:0: missing documentation (or could not parse documentation): invalid syntax (become_matches.py, line 1)

The test ansible-test sanity --test ansible-doc --python 3.8 [explain] failed with 1 error:

lib/ansible/plugins/become/sudo.py:0:0: missing documentation (or could not parse documentation): invalid syntax (become_matches.py, line 1)

The test ansible-test sanity --test docs-build [explain] failed with 2 errors:

docs/docsite/rst/dev_guide/style_guide/index.rst:148:0: undefined-label: undefined label: enable_become (if the link has no caption the label must precede a section header)
docs/docsite/rst/plugins/become.rst:50:0: toc-tree-glob-pattern-no-match: toctree glob pattern 'become/*' didn't match any documents

The test ansible-test sanity --test compile --python 2.6 [explain] failed with 1 error:

lib/ansible/plugins/doc_fragments/become_matches.py:1:1: SyntaxError: :# Copyright: (c) 2019, Ansible Project

The test ansible-test sanity --test compile --python 2.7 [explain] failed with 1 error:

lib/ansible/plugins/doc_fragments/become_matches.py:1:1: SyntaxError: :# Copyright: (c) 2019, Ansible Project

The test ansible-test sanity --test compile --python 3.5 [explain] failed with 1 error:

lib/ansible/plugins/doc_fragments/become_matches.py:1:1: SyntaxError: :# Copyright: (c) 2019, Ansible Project

The test ansible-test sanity --test compile --python 3.6 [explain] failed with 1 error:

lib/ansible/plugins/doc_fragments/become_matches.py:1:1: SyntaxError: :# Copyright: (c) 2019, Ansible Project

The test ansible-test sanity --test compile --python 3.8 [explain] failed with 1 error:

lib/ansible/plugins/doc_fragments/become_matches.py:1:1: SyntaxError: :# Copyright: (c) 2019, Ansible Project

The test ansible-test sanity --test compile --python 3.7 [explain] failed with 1 error:

lib/ansible/plugins/doc_fragments/become_matches.py:1:1: SyntaxError: :# Copyright: (c) 2019, Ansible Project

The test ansible-test sanity --test pep8 [explain] failed with 3 errors:

lib/ansible/plugins/doc_fragments/become_matches.py:1:2: E261 at least two spaces before inline comment
lib/ansible/plugins/doc_fragments/become_matches.py:2:1: E115 expected an indented block (comment)
lib/ansible/plugins/doc_fragments/become_matches.py:5:1: E112 expected an indented block

The test ansible-test sanity --test yamllint [explain] failed with 2 errors:

lib/ansible/plugins/doc_fragments/become_matches.py:1:1: python-syntax-error invalid syntax (<unknown>, line 1)
lib/ansible/plugins/doc_fragments/become_matches.py:1:1: python-syntax-error invalid syntax (<unknown>, line 1)

click here for bot help

@ansibot ansibot added needs_revision and removed core_review labels Jul 10, 2019

@@ -77,12 +77,23 @@ def _check_password_error(self, b_out, msg):
return b_fail and b_fail in b_out

def check_incorrect_password(self, b_output):
try:
self.fail = self.get_option('become_fail_match')

This comment has been minimized.

Copy link
@sivel

sivel Jul 10, 2019

Member

Should we allow regex here? Similar to what we do in doas and su for password prompts?

This comment has been minimized.

Copy link
@bcoca

bcoca Jul 10, 2019

Author Member

guess that would be most flexible

This comment has been minimized.

Copy link
@bcoca

bcoca Jul 10, 2019

Author Member

but we already use dgettext to try to get 'untranslated', not sure this will mesh well

@ansibot

This comment was marked as resolved.

Copy link
Contributor

commented Jul 10, 2019

The test ansible-test sanity --test ansible-doc --python 2.6 [explain] failed with 1 error:

lib/ansible/plugins/become/sudo.py:0:0: missing documentation (or could not parse documentation): missing options in fragment (become_matches), possibly misformatted?: /root/ansible/lib/ansible/plugins/become/sudo.py

The test ansible-test sanity --test ansible-doc --python 2.7 [explain] failed with 1 error:

lib/ansible/plugins/become/sudo.py:0:0: missing documentation (or could not parse documentation): missing options in fragment (become_matches), possibly misformatted?: /root/ansible/lib/ansible/plugins/become/sudo.py

The test ansible-test sanity --test ansible-doc --python 3.5 [explain] failed with 1 error:

lib/ansible/plugins/become/sudo.py:0:0: missing documentation (or could not parse documentation): missing options in fragment (become_matches), possibly misformatted?: /root/ansible/lib/ansible/plugins/become/sudo.py

The test ansible-test sanity --test ansible-doc --python 3.6 [explain] failed with 1 error:

lib/ansible/plugins/become/sudo.py:0:0: missing documentation (or could not parse documentation): missing options in fragment (become_matches), possibly misformatted?: /root/ansible/lib/ansible/plugins/become/sudo.py

The test ansible-test sanity --test ansible-doc --python 3.7 [explain] failed with 1 error:

lib/ansible/plugins/become/sudo.py:0:0: missing documentation (or could not parse documentation): missing options in fragment (become_matches), possibly misformatted?: /root/ansible/lib/ansible/plugins/become/sudo.py

The test ansible-test sanity --test ansible-doc --python 3.8 [explain] failed with 1 error:

lib/ansible/plugins/become/sudo.py:0:0: missing documentation (or could not parse documentation): missing options in fragment (become_matches), possibly misformatted?: /root/ansible/lib/ansible/plugins/become/sudo.py

The test ansible-test sanity --test docs-build [explain] failed with 2 errors:

docs/docsite/rst/dev_guide/style_guide/index.rst:148:0: undefined-label: undefined label: enable_become (if the link has no caption the label must precede a section header)
docs/docsite/rst/plugins/become.rst:50:0: toc-tree-glob-pattern-no-match: toctree glob pattern 'become/*' didn't match any documents

click here for bot help

@ansibot ansibot removed the ci_verified label Jul 11, 2019

@ansibot

This comment was marked as resolved.

Copy link
Contributor

commented Jul 11, 2019

The test ansible-test sanity --test future-import-boilerplate [explain] failed with 1 error:

lib/ansible/plugins/doc_fragments/become_matches.py:0:0: missing: from __future__ import (absolute_import, division, print_function)

The test ansible-test sanity --test metaclass-boilerplate [explain] failed with 1 error:

lib/ansible/plugins/doc_fragments/become_matches.py:0:0: missing: __metaclass__ = type

click here for bot help

@ansibot ansibot added the ci_verified label Jul 11, 2019

@bcoca bcoca removed the needs_triage label Jul 11, 2019

@ansibot ansibot removed the ci_verified label Jul 12, 2019

@ansibot

This comment was marked as resolved.

Copy link
Contributor

commented Jul 12, 2019

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/plugins/doc_fragments/become_matches.py:7:1: E302 expected 2 blank lines, found 1

click here for bot help

ws

@ansibot ansibot added core_review and removed needs_revision labels Jul 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.