mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 03:01:06 -03:30
Merge pull request #13171 from infamousjoeg/cyberark-ccp-branding-webserviceid
Cyberark ccp branding webserviceid
This commit is contained in:
committed by
GitHub
commit
c437a37be7
@@ -9,10 +9,16 @@ aim_inputs = {
|
|||||||
'fields': [
|
'fields': [
|
||||||
{
|
{
|
||||||
'id': 'url',
|
'id': 'url',
|
||||||
'label': _('CyberArk AIM URL'),
|
'label': _('CyberArk CCP URL'),
|
||||||
'type': 'string',
|
'type': 'string',
|
||||||
'format': 'url',
|
'format': 'url',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'id': 'webservice_id',
|
||||||
|
'label': _('Web Service ID'),
|
||||||
|
'type': 'string',
|
||||||
|
'help_text': _('The CCP Web Service ID. Leave blank to default to AIMWebService.'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'id': 'app_id',
|
'id': 'app_id',
|
||||||
'label': _('Application ID'),
|
'label': _('Application ID'),
|
||||||
@@ -64,10 +70,13 @@ def aim_backend(**kwargs):
|
|||||||
client_cert = kwargs.get('client_cert', None)
|
client_cert = kwargs.get('client_cert', None)
|
||||||
client_key = kwargs.get('client_key', None)
|
client_key = kwargs.get('client_key', None)
|
||||||
verify = kwargs['verify']
|
verify = kwargs['verify']
|
||||||
|
webservice_id = kwargs['webservice_id']
|
||||||
app_id = kwargs['app_id']
|
app_id = kwargs['app_id']
|
||||||
object_query = kwargs['object_query']
|
object_query = kwargs['object_query']
|
||||||
object_query_format = kwargs['object_query_format']
|
object_query_format = kwargs['object_query_format']
|
||||||
reason = kwargs.get('reason', None)
|
reason = kwargs.get('reason', None)
|
||||||
|
if webservice_id == '':
|
||||||
|
webservice_id = 'AIMWebService'
|
||||||
|
|
||||||
query_params = {
|
query_params = {
|
||||||
'AppId': app_id,
|
'AppId': app_id,
|
||||||
@@ -78,7 +87,7 @@ def aim_backend(**kwargs):
|
|||||||
query_params['reason'] = reason
|
query_params['reason'] = reason
|
||||||
|
|
||||||
request_qs = '?' + urlencode(query_params, quote_via=quote)
|
request_qs = '?' + urlencode(query_params, quote_via=quote)
|
||||||
request_url = urljoin(url, '/'.join(['AIMWebService', 'api', 'Accounts']))
|
request_url = urljoin(url, '/'.join([webservice_id, 'api', 'Accounts']))
|
||||||
|
|
||||||
with CertFiles(client_cert, client_key) as cert:
|
with CertFiles(client_cert, client_key) as cert:
|
||||||
res = requests.get(
|
res = requests.get(
|
||||||
@@ -92,4 +101,4 @@ def aim_backend(**kwargs):
|
|||||||
return res.json()['Content']
|
return res.json()['Content']
|
||||||
|
|
||||||
|
|
||||||
aim_plugin = CredentialPlugin('CyberArk AIM Central Credential Provider Lookup', inputs=aim_inputs, backend=aim_backend)
|
aim_plugin = CredentialPlugin('CyberArk Central Credential Provider Lookup', inputs=aim_inputs, backend=aim_backend)
|
||||||
|
|||||||
@@ -465,7 +465,7 @@
|
|||||||
},
|
},
|
||||||
"created": "2020-05-18T21:53:35.370730Z",
|
"created": "2020-05-18T21:53:35.370730Z",
|
||||||
"modified": "2020-05-18T21:54:05.436400Z",
|
"modified": "2020-05-18T21:54:05.436400Z",
|
||||||
"name": "CyberArk AIM Central Credential Provider Lookup",
|
"name": "CyberArk Central Credential Provider Lookup",
|
||||||
"description": "",
|
"description": "",
|
||||||
"kind": "external",
|
"kind": "external",
|
||||||
"namespace": "aim",
|
"namespace": "aim",
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ options:
|
|||||||
- The credential type being created.
|
- The credential type being created.
|
||||||
- Can be a built-in credential type such as "Machine", or a custom credential type such as "My Credential Type"
|
- Can be a built-in credential type such as "Machine", or a custom credential type such as "My Credential Type"
|
||||||
- Choices include Amazon Web Services, Ansible Galaxy/Automation Hub API Token, Centrify Vault Credential Provider Lookup,
|
- Choices include Amazon Web Services, Ansible Galaxy/Automation Hub API Token, Centrify Vault Credential Provider Lookup,
|
||||||
Container Registry, CyberArk AIM Central Credential Provider Lookup, CyberArk Conjur Secrets Manager Lookup, Google Compute Engine,
|
Container Registry, CyberArk Central Credential Provider Lookup, CyberArk Conjur Secret Lookup, Google Compute Engine,
|
||||||
GitHub Personal Access Token, GitLab Personal Access Token, GPG Public Key, HashiCorp Vault Secret Lookup, HashiCorp Vault Signed SSH,
|
GitHub Personal Access Token, GitLab Personal Access Token, GPG Public Key, HashiCorp Vault Secret Lookup, HashiCorp Vault Signed SSH,
|
||||||
Insights, Machine, Microsoft Azure Key Vault, Microsoft Azure Resource Manager, Network, OpenShift or Kubernetes API
|
Insights, Machine, Microsoft Azure Key Vault, Microsoft Azure Resource Manager, Network, OpenShift or Kubernetes API
|
||||||
Bearer Token, OpenStack, Red Hat Ansible Automation Platform, Red Hat Satellite 6, Red Hat Virtualization, Source Control,
|
Bearer Token, OpenStack, Red Hat Ansible Automation Platform, Red Hat Satellite 6, Red Hat Virtualization, Source Control,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
credential:
|
credential:
|
||||||
description: Credential for Testing Source
|
description: Credential for Testing Source
|
||||||
name: "{{ src_cred_name }}"
|
name: "{{ src_cred_name }}"
|
||||||
credential_type: CyberArk AIM Central Credential Provider Lookup
|
credential_type: CyberArk Central Credential Provider Lookup
|
||||||
inputs:
|
inputs:
|
||||||
url: "https://cyberark.example.com"
|
url: "https://cyberark.example.com"
|
||||||
app_id: "My-App-ID"
|
app_id: "My-App-ID"
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
credential:
|
credential:
|
||||||
description: Credential for Testing Source Change
|
description: Credential for Testing Source Change
|
||||||
name: "{{ src_cred_name }}-2"
|
name: "{{ src_cred_name }}-2"
|
||||||
credential_type: CyberArk AIM Central Credential Provider Lookup
|
credential_type: CyberArk Central Credential Provider Lookup
|
||||||
inputs:
|
inputs:
|
||||||
url: "https://cyberark-prod.example.com"
|
url: "https://cyberark-prod.example.com"
|
||||||
app_id: "My-App-ID"
|
app_id: "My-App-ID"
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
credential:
|
credential:
|
||||||
name: "{{ src_cred_name }}"
|
name: "{{ src_cred_name }}"
|
||||||
organization: Default
|
organization: Default
|
||||||
credential_type: CyberArk AIM Central Credential Provider Lookup
|
credential_type: CyberArk Central Credential Provider Lookup
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
credential:
|
credential:
|
||||||
name: "{{ src_cred_name }}-2"
|
name: "{{ src_cred_name }}-2"
|
||||||
organization: Default
|
organization: Default
|
||||||
credential_type: CyberArk AIM Central Credential Provider Lookup
|
credential_type: CyberArk Central Credential Provider Lookup
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user