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

tss lookup plugin: Add ability to provide additional query parameters when requesting a secret #9033

Open
1 task done
hendricksonet629 opened this issue Oct 17, 2024 · 2 comments
Labels
feature This issue/PR relates to a feature request lookup lookup plugin module_utils module_utils plugins plugin (any type)

Comments

@hendricksonet629
Copy link

Summary

Add ability to provide additional query parameters when requesting a secret as detailed in the API. https://updates.thycotic.net/secretserver/restapiguide/11.6.3/WinAuth/#tag/Secrets/operation/SecretsService_GetSecretV2

SUMMARY
Add the ability to include additional query parameters as outlined in the Secret Server API. Over time, the query parameters have changed, so it might be prudent to allow an array of free-text query parameters be added. This will allow the engineer to easily control when field name changes or is added rather than hard coding the query parameter names into the module. That is more of a suggestion based on my experiences with the Secret Server API, not a requirement.

As noted in the previous thread, some of the fields such as "autoComment" are required for some types of secrets and the current implementation does not allow for this to work.

ISSUE TYPE
Feature Pull Request

COMPONENT NAME
community.general/plugins/lookup/tss.py

ADDITIONAL INFORMATION

Previously requested on 2/23/2022, but PR was not finalized.
#4280

Issue Type

Feature Idea

Component Name

plugins/lookup/tss.py

Additional Information

- name: Create an array of query params
  hosts: localhost
  vars:
    query_params:
      - name: autoComment
        value: "Adding required comment"
      - name: includeInactive
        value: true
      - name: forceCheckIn
        value: true
  tasks:
  - name: Get the thycotic secret
    set_fact:
      secret: >-
        {{
            lookup(
                'community.general.tss',
                secret_id,
                base_url=thycotic_api_address,
                username=thycotic_username,
                password=thycotic_password
                query_param=query_params
            )
        }}

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request lookup lookup plugin module_utils module_utils plugins plugin (any type) labels Oct 17, 2024
@russoz russoz changed the title Add ability to provide additional query parameters when requesting a secret tss lookup plugin: Add ability to provide additional query parameters when requesting a secret Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request lookup lookup plugin module_utils module_utils plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

2 participants