Commit Graph

21 Commits

Author SHA1 Message Date
Sergiy Markin 37ba567da5 Airflow stable 2.6.2
This PS updates python modules and code to match Airflow 2.6.2:

- bionic py36 gates  were removed
- python code corrected to match new modules versions
- selection of python modules versions was perfrmed based on
  airflow-2.6.2 constraints
- airskiff deploy pipeline was aligned with latest in treasuremap v1.9
- postgresql image updated to 14.8

Change-Id: I65a1b86473ee3e988aae353b59fb5473d75851f9
2023-08-29 17:09:37 +00:00
Sergiy Markin 03f6932e16 Deckhand updates
This PS delivers the following updates:
- fixed sample config and policy files generation in tox
- rolled back chart version incremention back to 0.2.0

Change-Id: I509030319a724b18bb21f45f7ede7c07ab18e894
2023-04-28 22:18:29 +00:00
Aaron Sheffield 349e5600df Redacts Raw Documents
- If a document has a storage policy of encrypted
 - Redacts (sha256) the data section.
 - Redacts (sha256) the substition paths.
- Uses the same /documents endpoint, adds a new query parameter
  ?cleartext-secrets=true to show the non-redacted values.

Change-Id: I42808901b97c667a1148c00fbb7717a0847c9981
2018-10-19 23:56:12 -05:00
Felipe Monteiro 3f39e639ea [Gate Fix] Fix failing functional/integration tests
This patch set pins oslo.messaging to the last stable version
to fix the gate [0]. 9.0.0 is incompatible with current
requirements.

[0] https://pypi.org/project/oslo.messaging/#history

Change-Id: I6cf3e9f33ac3efcbf48675273899af38fef86e91
2018-10-05 18:18:55 +01:00
pallav 9345035522 Adding api for revisions deep diffing
GET /revisions/{{revision_id}}/deepdiff/{{comparison_revision_id}}

 - Added deepdiff api for generating diff between
   two rendered documents.
 - Deep diffing for data and metadata
 - Refactor diff functions
 - Client update
 - Added unit testcases
 - Added funtional testcases
 - Doc update

Change-Id: Ib60fa60a3b33e9125a1595a999272ca595721b38
2018-09-17 17:01:34 +05:30
Felipe Monteiro 5491972b8e Add missing Keystone options to registration of config
This patchset adds missing Keystone options to registration
of config, including timeout.

This fix is similar to a recent Shipyard patchset [0] which
aimed to solve the same issue but expands on it by following
Nova patterns here: [1].

This also updates the sample config file which now includes
the timeout option.

[0] https://review.openstack.org/#/c/572563/
[1] http://git.openstack.org/cgit/openstack/nova/tree/nova/conf/cinder.py

Change-Id: I4e52170e48dba7064c69f42f4cbbb7e54eae11a9
2018-06-16 06:31:03 +00:00
Luna Das 8538ff5671 Add no oauth middleware to bypass keystone authentication
This PS adds noauth middleware to bypass keystone authentication
which will occur when Deckhand's server is executed in development
mode. Development mode is enabled by setting development_mode as True
in etc/deckhand/deckhand.conf.sample.

The logic is similar to Drydock's here: [0].

[0] 1c78477e95/drydock_provisioner/util.py (L43)

Co-Authored-By: Luna Das <luna.das@imaginea.com>
Co-Authored-By: Felipe Monteiro <felipe.monteiro@att.com>
Change-Id: I677d3d92768e0aa1a550772700403e0f028b0c59
2018-05-08 03:46:52 +01:00
Felipe Monteiro c094b16ff6 Clean up integration test script
This PS:

* adds a trap to clean up OSH which is deployed in the
  course of integration tests. It appears as though node cleanup
  in Jenkins is hanging so this is to try to ameliorate that
* creates a deckhand.conf.test to be used by functional and
  integration tests instead of writing it out dynamically [0]
* updates logging.conf.sample to dump logs to stdout/stderr
  by default as this is amenable to containers
* makes test_gabbi.py common between functional and integration
  tests to avoid unnecessary code duplication

[0] review comments in https://review.gerrithub.io/#/c/att-comdev/deckhand/+/407638/

Change-Id: I762fb0bde5f75effcde56316d92bd57b30026995
2018-05-01 21:45:03 +00:00
Felipe Monteiro c729cd930d Rename Deckhand bucket endpoint to buckets for consistency
According to guides like [0] RESTful resource name should
use pluralization for nouns, for the sake of consistency.

As such, this PS renames PUT bucket/{bucket_name}/documents
to PUT buckets/{bucket_name}/documents

Required renames have also been made to the following UCP
projects:

  - Shipyard -> https://review.gerrithub.io/#/c/384121/

[0] https://restfulapi.net/resource-naming/

Change-Id: Icb01e29db0b8b12e66895135baa9be525ba7d72b
2017-10-27 19:21:03 +01:00
Felipe Monteiro 8aec0390f8 DECKHAND-80: Validations API Implementation
The Validations API has been introduced to Deckhand, allowing users
to register new validation results in Deckhand, as well as query
the API for validation results for a revision. The validation results
include a list of errors that occurred during document validation.

All functional tests related to the API are now passing.

The following endpoints have been implemented:

   * /api/v1.0/revisions/{revision_id}/validations
   * /api/v1.0/revisions/{revision_id}/validations/{validation_name}
   * /api/v1.0/revisions/{revision_id}/validations/{validation_name}/entries
   * /api/v1.0/revisions/{revision_id}/validations/{validation_name}/entries/{entry_id}

Some back-end refactoring was needed to implement this API. In
particular:

  - Added a new Validation sqlalchemy DB model
  - Introduced DataSchema handling to the engine.document_validation
    module so that registered schema validations can be used
  - Changed the way the result of the 'deckhand-schema-validation' internal
    validation is generated: it is now the amalgamation of all the
    internal and registered schema validations executed
  - Introduced rawquery generation so that raw SQL queries can be used to
    get results from DB

Fixed following bug:

  - UniqueConstraint is now used to correctly generate unique constraints
    for sqlalchemy models that are supposed to be combinations of columns

Change-Id: I53c79a6544f44ef8beab2600ddc8a3ea91ada903
2017-10-21 23:09:16 -04:00
Felipe Monteiro 90226c2ae1 Integrate Deckhand with keystone auth
This PS integrates Deckhand with keystone auth so
that Deckhand can check whether a keystone token is
authenticated (by way of keystonemiddleware)
before proceeding with any requests.

The architecture for this PS is borrowed from [0]
which successfully integrates keystone authentication
with the falcon web application framework. However,
additional Deckhand-specific changes were made for
tests to pass.

The following changes have been made:

  - add paste deploy configuration file which adds
    keystonemiddleware integration to Deckhand; this
    makes it trivial for keystonemiddleware to determine
    whether a token in the X-Auth-Token header is authenticated
  - use paste.deploy to create a web app
  - update unit tests for testing controllers
  - update functional test script to ignore keystone authentication
    because functional tests don't currently support keystone
    integration

[0] https://github.com/stannum-l/nautilus

Change-Id: I6eeeb4a4d9ab1f1cc8fb338e5cc21136ab4d5684
2017-10-16 19:54:46 +01:00
Felipe Monteiro d2d2312af9 DECKHAND-66: Document substitution implementation
This PS implements documentation substitution and
the rendered-documents endpoint. Each time the
rendered-documents is queried, the documents for
the reqeust revision_id dynamically undergo
secret substitution.

All functional tests related to secret substitution
have been unskipped.

Deckhand currently does not real testing for
verifying that secret substitution works
for encrypted documents. This will only happen
when integration testing is added to Deckhand to
test its interaction with Keystone and Barbican.

Included in this PS:
  - basic implementation for secret substitution
  - introduction of jsonpath_ng for searching for and
    updating jsonpaths in documents
  - rendered-documents endpoint
  - unit tests
  - all relevant functional tests unskipped
  - additional bucket controller tests include RBAC
    tests and framework testing RBAC via unit tests

Change-Id: I86f269a5b616b518e5f742a4005891412226fe2a
2017-10-13 15:16:27 -04:00
Felipe Monteiro 582dee6fb9 DECKHAND-61: oslo.policy integration
This PS implements oslo.policy integration in Deckhand.
The policy.py file implements 2 types of functions for
performing policy enforcement in Deckhand: authorize,
which is a decorator that is used directly around
falcon on_HTTP_VERB methods that raises a 403 immediately
if policy enforcement fails; and conditional_authorize,
to be used inside controller code conditionally.

For example, since Deckhand has two types of documents
with respect to security -- encrypted and cleartext
documents -- policy enforcement is conditioned on the
type of the documents' metadata.storagePolicy.

Included in this PS:
  - policy framework implementation
  - policy in code and policy documentation for all
    Deckhand policies
  - modification of functional test script to override
    default admin-only policies with custom policy file
    dynamically created using lax permissions
  - bug fix for filtering out deleted documents (and
    its predecessors in previous revisions) for
    PUT /revisions/{revision_id}/documents
  - policy documentation
  - basic unit tests for policy enforcement framework
  - allow functional tests to be filtered via regex

Due to the size of this PS, functional tests related to
policy enforcement will be done in a follow up.

Change-Id: If418129f9b401091e098c0bd6c7336b8a5cd2359
2017-10-07 18:43:28 +01:00
Felipe Monteiro 905ca1732b Fix Deckhand logging
The following deployment logic should be included to get logging
to work correctly:

1) tox -egenconfig
   - Store the output in /etc/deckhand/deckhand.conf for example
2) Copy logging.conf.sample in etc folder to /etc/deckhand/logging.conf
3) Set the following options in under [DEFAULT] in
   /etc/deckhand/deckhand.conf:

   - log_config_append = /etc/deckhand/logging.conf
   - log_file = deckhand.log
   - log_dir = <path/to/deckhand/dir>
   - debug = true (optionally)

Change-Id: I8e8ebd041e801a5eef0f10b1bbc76ce95aecbf55
2017-09-19 15:45:40 -04:00
Felipe Monteiro e62e9e9f40 DECKHAND-33: Add oslo.config options for keystone auth
This commit adds oslo.config options for keystone auth and
updates Deckhand's request context to use oslo_context for
facilitating integration with keystone auth options.

Change-Id: Ifd170e1a192402a970f8538f0c06bf017fe77f88
2017-08-24 20:12:05 +01:00
Felipe Monteiro 2fd01fd9b4 Add currently necessary oslo namespaces to oslo-config-generator conf file.
This commit adds the following namespaces to deckhand's
config-generator.conf file used by oslo-config-generator
to generate deckhand's conf file automatically:

* oslo.db
* oslo.db.concurrency
* oslo.log

This will automatically populate the generate conf file with
needed oslo config options.
2017-07-21 02:20:13 +01:00
Felipe Monteiro 31eb6b2b29 Added logic for establishing DB connection. 2017-07-19 22:06:39 +01:00
Felipe Monteiro bc36541f52 Merge branch 'master' into oslo-log-integration 2017-07-06 18:48:42 -04:00
Felipe Monteiro 6a25e6f06b Add oslo.log integration
This commit adds oslo.log integration to Deckhand.
2017-07-06 23:45:09 +01:00
Felipe Monteiro c825e77418 DECKHAND-10: Add Barbican integration to Deckhand
This commit adds Barbican integration to Deckhand.
2017-06-29 22:25:11 +01:00
Felipe Monteiro eab524abd8 Oslo config integration (#1)
* DECKHAND-11: Add oslo.config integration to Deckhand

This commit adds oslo.config integration to Deckhand. It also
creates a lot of preliminary files/configuration settings
needed to run tox as well as lint and oslo-config-generator
jobs.

* Remove sample config file.
2017-06-26 16:57:50 -07:00