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

Create onepassword_ssh_key plugin #9580

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

mohammedbabelly20
Copy link

@mohammedbabelly20 mohammedbabelly20 commented Jan 17, 2025

SUMMARY

FIxes: #7417

ISSUE TYPE
  • New Module/Plugin Pull Request
COMPONENT NAME

Added a new plugin onepassword_ssh_key to fetch private keys stored in onepassword in both SSH format and PKCS#8 format.

@mohammedbabelly20
Copy link
Author

CC @samdoran

@ansibullbot
Copy link
Collaborator

The test botmeta failed with 1 error:

.github/BOTMETA.yml:0:0: Author mohammedbabelly20 not mentioned as active or inactive maintainer for plugins/lookup/onepassword_ssh_key.py (mentioned are: samdoran)

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

plugins/doc_fragments/onepassword_ssh_key.py:64:15: W291: trailing whitespace
plugins/lookup/onepassword_ssh_key.py:35:19: W291: trailing whitespace

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

plugins/lookup/onepassword_ssh_key.py:89:8: disallowed-name: Disallowed name "_"
plugins/lookup/onepassword_ssh_key.py:89:16: disallowed-name: Disallowed name "_"

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

plugins/doc_fragments/onepassword_ssh_key.py:64:15: W291: trailing whitespace
plugins/lookup/onepassword_ssh_key.py:35:19: W291: trailing whitespace

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

plugins/lookup/onepassword_ssh_key.py:0:0: version-added-must-be-major-or-minor: DOCUMENTATION: version_added ('10.2.1') must be a major or minor release, not a patch release (see specification at https://semver.org/). Got {'name': 'onepassword_ssh_key', 'author': ['Mohammed Babelly (@mohammedbabelly20)'], 'requirements': ['C(op) 1Password command line utility version 2 or later.', 'See U(https://support.1password.com/command-line/)'], 'short_description': 'Fetch SSH Keys stored in 1Password', 'version_added': '10.2.1', 'description': ['P(community.general.onepassword_ssh_key#lookup) wraps C(op) command line utility to fetch ssh keys from 1Password.'], 'notes': ["By default, it returns the private key value in ...

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

plugins/lookup/onepassword_ssh_key.py:0:0: version-added-must-be-major-or-minor: DOCUMENTATION: version_added ('10.2.1') must be a major or minor release, not a patch release (see specification at https://semver.org/). Got {'name': 'onepassword_ssh_key', 'author': ['Mohammed Babelly (@mohammedbabelly20)'], 'requirements': ['C(op) 1Password command line utility version 2 or later.', 'See U(https://support.1password.com/command-line/)'], 'short_description': 'Fetch SSH Keys stored in 1Password', 'version_added': '10.2.1', 'description': ['P(community.general.onepassword_ssh_key#lookup) wraps C(op) command line utility to fetch ssh keys from 1Password.'], 'notes': ["By default, it returns the private key value in ...

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

plugins/lookup/onepassword_ssh_key.py:89:8: disallowed-name: Disallowed name "_"
plugins/lookup/onepassword_ssh_key.py:89:16: disallowed-name: Disallowed name "_"

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

plugins/lookup/onepassword_ssh_key.py:89:8: disallowed-name: Disallowed name "_"
plugins/lookup/onepassword_ssh_key.py:89:16: disallowed-name: Disallowed name "_"

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

plugins/lookup/onepassword_ssh_key.py:0:0: version-added-must-be-major-or-minor: DOCUMENTATION: version_added ('10.2.1') must be a major or minor release, not a patch release (see specification at https://semver.org/). Got {'name': 'onepassword_ssh_key', 'author': ['Mohammed Babelly (@mohammedbabelly20)'], 'requirements': ['C(op) 1Password command line utility version 2 or later.', 'See U(https://support.1password.com/command-line/)'], 'short_description': 'Fetch SSH Keys stored in 1Password', 'version_added': '10.2.1', 'description': ['P(community.general.onepassword_ssh_key#lookup) wraps C(op) command line utility to fetch ssh keys from 1Password.'], 'notes': ["By default, it returns the private key value in ...

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

plugins/lookup/onepassword_ssh_key.py:89:8: disallowed-name: Disallowed name "_"
plugins/lookup/onepassword_ssh_key.py:89:16: disallowed-name: Disallowed name "_"

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

plugins/lookup/onepassword_ssh_key.py:0:0: version-added-must-be-major-or-minor: DOCUMENTATION: version_added ('10.2.1') must be a major or minor release, not a patch release (see specification at https://semver.org/). Got {'name': 'onepassword_ssh_key', 'author': ['Mohammed Babelly (@mohammedbabelly20)'], 'requirements': ['C(op) 1Password command line utility version 2 or later.', 'See U(https://support.1password.com/command-line/)'], 'short_description': 'Fetch SSH Keys stored in 1Password', 'version_added': '10.2.1', 'description': ['P(community.general.onepassword_ssh_key#lookup) wraps C(op) command line utility to fetch ssh keys from 1Password.'], 'notes': ["By default, it returns the private key value in ...

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

plugins/doc_fragments/onepassword_ssh_key.py:64:15: W291: trailing whitespace
plugins/lookup/onepassword_ssh_key.py:35:19: W291: trailing whitespace

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

plugins/doc_fragments/onepassword_ssh_key.py:64:15: W291: trailing whitespace
plugins/lookup/onepassword_ssh_key.py:35:19: W291: trailing whitespace

click here for bot help

@ansibullbot ansibullbot added ci_verified Push fixes to PR branch to re-run CI docs_fragments docs_fragments plugin (shared docs) lookup lookup plugin needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor plugins plugin (any type) labels Jan 17, 2025
Copy link
Collaborator

@russoz russoz left a comment

Choose a reason for hiding this comment

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

hi @mohammedbabelly20 thanks for contributing!

I have some comments on your plugin. Please notice that all new plugins are required to include tests - integration tests are preferred, but unit tests are accepted.

plugins/doc_fragments/onepassword_ssh_key.py Outdated Show resolved Hide resolved
plugins/lookup/onepassword_ssh_key.py Outdated Show resolved Hide resolved
plugins/lookup/onepassword_ssh_key.py Outdated Show resolved Hide resolved
plugins/lookup/onepassword_ssh_key.py Outdated Show resolved Hide resolved
plugins/lookup/onepassword_ssh_key.py Outdated Show resolved Hide resolved
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-10 Automatically create a backport for the stable-10 branch labels Jan 18, 2025
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

plugins/doc_fragments/onepassword_ssh_key.py Outdated Show resolved Hide resolved
@ansibullbot
Copy link
Collaborator

The test botmeta failed with 1 error:

.github/BOTMETA.yml:0:0: Author mohammedbabelly20 not mentioned as active or inactive maintainer for plugins/lookup/onepassword_ssh_key.py (mentioned are: samdoran)

The test licenses failed with 2 errors:

tests/unit/plugins/lookup/onepassword_fixtures/ssh_key_output.json:0:0: found no copyright notice
tests/unit/plugins/lookup/onepassword_fixtures/ssh_key_output.json:0:0: must have at least one license

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

tests/unit/plugins/lookup/test_onepassword.py:282:30: W291: trailing whitespace

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

tests/unit/plugins/lookup/test_onepassword.py:282:30: W291: trailing whitespace

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

tests/unit/plugins/lookup/test_onepassword.py:282:30: W291: trailing whitespace

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

tests/unit/plugins/lookup/test_onepassword.py:282:29: trailing-whitespace: Trailing whitespace

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

tests/unit/plugins/lookup/test_onepassword.py:282:30: W291: trailing whitespace

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

tests/unit/plugins/lookup/test_onepassword.py:282:29: trailing-whitespace: Trailing whitespace

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

tests/unit/plugins/lookup/test_onepassword.py:282:29: trailing-whitespace: Trailing whitespace

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

tests/unit/plugins/lookup/test_onepassword.py:282:29: trailing-whitespace: Trailing whitespace

click here for bot help

@ansibullbot ansibullbot added new_plugin New plugin tests tests unit tests/unit labels Jan 20, 2025
@ansibullbot ansibullbot added ci_verified Push fixes to PR branch to re-run CI and removed ci_verified Push fixes to PR branch to re-run CI labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-10 Automatically create a backport for the stable-10 branch check-before-release PR will be looked at again shortly before release and merged if possible. ci_verified Push fixes to PR branch to re-run CI docs_fragments docs_fragments plugin (shared docs) lookup lookup plugin needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor new_plugin New plugin plugins plugin (any type) tests tests unit tests/unit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1password lookup for Private Keys has incorrect key format
4 participants