deckhand/deckhand/types.py
Felipe Monteiro c9cdd7514c [feat] DECKHAND-38: Secrets DB model and secrets manager.
This commit adds a DocumentSecret model to the DB for
storing secrets directly in Deckhand as well as references
to secrets stored in Barbican if the encryption type
for the secret is encrypted.

This commit also adds a new class called SecretsManager
for managing the lifecycle of secrets from a higher level.

This commit also adds Postgres compliance. So now all
the DB models should work with Postgres.

Also includes unit tests.

Change-Id: Id7c4be8de2e70735f42b1f6710139d553ab4bea2
2017-09-11 12:39:38 -04:00

47 lines
1.3 KiB
Python

# Copyright 2017 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO(fmontei): Make all these version-less.
DOCUMENT_SCHEMA_TYPES = (
CERTIFICATE_SCHEMA,
CERTIFICATE_KEY_SCHEMA,
LAYERING_POLICY_SCHEMA,
PASSPHRASE_SCHEMA,
VALIDATION_POLICY_SCHEMA,
) = (
'deckhand/Certificate',
'deckhand/CertificateKey',
'deckhand/LayeringPolicy/v1',
'deckhand/Passphrase',
'deckhand/ValidationPolicy/v1',
)
DOCUMENT_SECRET_TYPES = (
CERTIFICATE_KEY_SCHEMA,
CERTIFICATE_SCHEMA,
PASSPHRASE_SCHEMA
) = (
'deckhand/Certificate',
'deckhand/CertificateKey',
'deckhand/Passphrase'
)
DECKHAND_VALIDATION_TYPES = (
DECKHAND_SCHEMA_VALIDATION,
) = (
'deckhand-schema-validation',
)