golden hour
/opt/saltstack/salt/lib/python3.10/site-packages/salt/runners/__pycache__
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.cpython-310.pyc
197 B
Del
OK
asam.cpython-310.pyc
7.9 KB
Del
OK
auth.cpython-310.pyc
1.89 KB
Del
OK
bgp.cpython-310.pyc
12.55 KB
Del
OK
cache.cpython-310.pyc
10.98 KB
Del
OK
cloud.cpython-310.pyc
4.16 KB
Del
OK
config.cpython-310.pyc
1.08 KB
Del
OK
ddns.cpython-310.pyc
6.7 KB
Del
OK
digicertapi.cpython-310.pyc
16.23 KB
Del
OK
doc.cpython-310.pyc
1.76 KB
Del
OK
drac.cpython-310.pyc
4.15 KB
Del
OK
error.cpython-310.pyc
771 B
Del
OK
event.cpython-310.pyc
2.32 KB
Del
OK
f5.cpython-310.pyc
8.29 KB
Del
OK
fileserver.cpython-310.pyc
17.12 KB
Del
OK
git_pillar.cpython-310.pyc
3.54 KB
Del
OK
http.cpython-310.pyc
2.55 KB
Del
OK
jobs.cpython-310.pyc
13.26 KB
Del
OK
launchd.cpython-310.pyc
1.49 KB
Del
OK
lxc.cpython-310.pyc
13.3 KB
Del
OK
manage.cpython-310.pyc
21.71 KB
Del
OK
mattermost.cpython-310.pyc
4.21 KB
Del
OK
mine.cpython-310.pyc
1.79 KB
Del
OK
nacl.cpython-310.pyc
8.46 KB
Del
OK
net.cpython-310.pyc
27.7 KB
Del
OK
network.cpython-310.pyc
2.59 KB
Del
OK
pagerduty.cpython-310.pyc
3.96 KB
Del
OK
pillar.cpython-310.pyc
4.25 KB
Del
OK
pkg.cpython-310.pyc
1.37 KB
Del
OK
queue.cpython-310.pyc
8.14 KB
Del
OK
reactor.cpython-310.pyc
4.32 KB
Del
OK
salt.cpython-310.pyc
4.58 KB
Del
OK
saltutil.cpython-310.pyc
15.88 KB
Del
OK
sdb.cpython-310.pyc
2.54 KB
Del
OK
smartos_vmadm.cpython-310.pyc
7.99 KB
Del
OK
spacewalk.cpython-310.pyc
7.54 KB
Del
OK
ssh.cpython-310.pyc
1000 B
Del
OK
state.cpython-310.pyc
8.22 KB
Del
OK
survey.cpython-310.pyc
5.07 KB
Del
OK
test.cpython-310.pyc
2.65 KB
Del
OK
thin.cpython-310.pyc
1.81 KB
Del
OK
vault.cpython-310.pyc
10.01 KB
Del
OK
venafiapi.cpython-310.pyc
5.57 KB
Del
OK
virt.cpython-310.pyc
13.15 KB
Del
OK
vistara.cpython-310.pyc
4.39 KB
Del
OK
winrepo.cpython-310.pyc
5.14 KB
Del
OK
Edit: digicertapi.cpython-310.pyc
o �xe�V � @ s� d Z ddlZddlZddlZddlZddlZddlmZ ddlZ ddl mZ ddlZ ddl Z ddlZ ddlmZmZ z ddlmZ dZW n# eyg dZzddlmZ W n eyd ddlmZ Y nw Y nw dZe�e�Zd d � Zdd� Zd d� Zdd� Zd2dd�Z d2dd�Z!d2dd�Z" d3dd�Z#d4dd�Z$ d5dd�Z%d6dd �Z&d!d"� Z' # d7d$d%�Z(d&d'� Z)d(d)� Z*d*d+� Z+d,d-� Z,d.d/� Z-d0d1� Z.dS )8a< Support for Digicert. Heavily based on the Venafi runner by Joseph Hall (jphall@saltstack.com). Before using this module you need to register an account with Digicert's CertCentral. Login to CertCentral, ensure you have a payment method configured and/or there are adequate funds attached to your account. Click the ``Account`` item in the left sidebar, and select ``Account Access``. The right hand pane should show "Account Access" and a link to create an API key. Create a new API key and assign it to the user that should be attached to requests coming from Salt. NOTE CertCentral will not show the API key again after revealing it the first time. Make sure you copy it right away or you will have to revoke it and generate a new one. Now open ``/etc/salt/master`` and add the API key as shown below. .. code-block:: yaml digicert: api_key: ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABC Restart your Salt Master. You can also include default values of the following variables to help with creating CSRs: .. code-block:: yaml digicert: api_key: ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABC shatype: sha256 This API currently only supports RSA key types. Support for other key types will be added if interest warrants. � N)�Sequence)�CommandExecutionError�SaltRunnerError)�RSATF�digicertc C s t �di ��d�rtS dS )zE Only load the module if digicert has configuration in place r �api_keyF)�__opts__�get�__virtualname__� r r �L/opt/saltstack/salt/lib/python3.10/site-packages/salt/runners/digicertapi.py�__virtual__B s r c C � t �di ��dd�S )z Return the base_url r Zbase_urlz%https://www.digicert.com/services/v2/�r r r r r r � _base_urlK s �r c C r )z Return the API key r r � r r r r r �_api_keyT s r c O s� t jjj| fi |��}d|d v r|d S t|d d d �}t|d d d �}|dkr/i S || d }|dkr?|d | S |d | }|d } td|�D ] } | d �|| d � } t jj�| |�}|| �|d | � qN|S ) zN Wrapper to assist with paginated responses from Digicert's REST API. �errors�dictZpage�limit�totalr � � z ?offset={})�salt�utils�http�query�int�range�format�extend)�urlZtopkey�args�kwargs�retZlimr ZnumpagesZ aggregate_ret�pZ param_urlZnext_retr r r � _paginate[ s"