6 Commits

Author SHA1 Message Date
Yasufumi Ogawa
a3377de871 Drop most of six importings
This update is to drop six, and also Python2 support. However, only
`tacker/test/common/helpers.py` which defines a set of functions for
Python2 is remained because `compact_byte()` is called from several test
classes. Although it'is not so quite hard to drop, better to be done in
another patch because so many changes shouldn't be included in a update.

Here is a summary of changes.

* Remove all six importing other than `helpers.py`.

* Revise the order of importing modules becaseu it's checked strictly
  more in the recent pep8 test.

* For the update, it removes a test `test_json_with_utf()` defined in
  `tacker/tests/unit/test_wsgi.py` because it's required only for Python2
  and can be skipped for Python3, so no need to keep anymore.

* Remove six from `requirements.txt` and `lower-constraints.txt`.

Partial-bug: #1778644

Change-Id: Ib37fd00ab6836e4efc04d1c14c10f312379c7212
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
2020-10-19 12:10:05 +00:00
Andreas Jaeger
4a2fd6c292 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found by updated hacking version.

Update local hacking checks for new flake8.

Remove hacking and friends from lower-constraints, they are not
needed in installations.

Change-Id: If787d610315be6c973b4335e047242c3aa3caf2a
2020-04-24 13:48:53 +02:00
Li Jiale
210d8f93bb Support shared vim for policy action execution
Change-Id: Ib58255e5b860f95b6c95c1373ee2c2e70722cd81
Co-Authored-By: Yan Xing an <yanxingan@cmss.chinamobile.com>
Implements: blueprint shared-barbican-secret
2018-07-29 13:56:45 +08:00
Li Jiale
13d85bdeb1 Cannot to delete vim, if barbican's secret does not existed.
When deleting vim, if the fernet key associated with vim does not
exist in barbican, vim is also allowed to be deleted.

Change-Id: Icec26074423fb0fcd04f0051706402c15da86d08
Closes-bug: #1783959
2018-07-27 16:09:32 +08:00
yong sheng gong
e31015cd75 Fix the way to get barbican base url
urllib parser join will remove last part of
barbican endpoint, so use string concatenation
directly.

Co-Authored-By: yong sheng gong <gong.yongsheng@99cloud.net>
Co-Authored-By: doantungbk <doantungbk.203@gmail.com

Change-Id: I7e4b73aaedb393585b154f075a902f1b71ebc19f
Closes-bug: #1709418
2017-08-09 13:10:37 +08:00
Yan Xing'an
07428d4985 Support to use barbican to encode vim password
1. Add new option 'use_barbican' in config file [vim_keys] section,
   default value is False for Pike.
2. Use fernet to encrypt vim password, and save the fernet key into
   barbican as a secret.
3. Add new fields 'key_type', 'secret_uuid' into VimAuth.auth_cred
   json string. secret_uuid is masked in vim-show or vim-list response.
4. Set the vim's default 'shared' value to False,
   vim can only be used by who created it.
5. Add a devref to show how to test.
6. Add a release note.

Implements: blueprint encryption-with-barbican
Partial-bug: #1667652

Change-Id: I5c779041df5a08a361b9aaefac7d241369732551
2017-06-26 07:23:10 -07:00