Compare commits

..

No commits in common. "d96f888e481d8f7043fc989f85e96141fc6d8a84" and "5d8dd6881f3a8b8e6936746b83b4147d64054cbb" have entirely different histories.

7 changed files with 9 additions and 34 deletions

View file

@ -1,9 +1,3 @@
## 0.1.0a9 (2025-02-17)
### Fix
- support hidden attribut
## 0.1.0a8 (2025-02-17) ## 0.1.0a8 (2025-02-17)
### Fix ### Fix

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project] [project]
name = "rougail.user_data_bitwarden" name = "rougail.user_data_bitwarden"
version = "0.1.0a9" version = "0.1.0a8"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}] authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md" readme = "README.md"
description = "Rougail user_data Bitwarden" description = "Rougail user_data Bitwarden"

View file

@ -85,7 +85,7 @@ class RougailUserDataBitwarden:
self.bitwarden_command_line = bitwarden_command_line self.bitwarden_command_line = bitwarden_command_line
def run(self): def run(self):
self.set_passwords(self.config.forcepermissive) self.set_passwords(self.config)
return {'errors': self.errors, return {'errors': self.errors,
'warnings': self.warnings, 'warnings': self.warnings,
} }

View file

@ -1,12 +1,12 @@
{ {
"rougail.leader.username": [ "rougail.leader.username": [
{
"rougail.leader.username": "test_multi_username2",
"rougail.leader.secret": "test_multi_password2"
},
{ {
"rougail.leader.username": "test_multi_username1", "rougail.leader.username": "test_multi_username1",
"rougail.leader.secret": "test_multi_password1" "rougail.leader.secret": "test_multi_password1"
},
{
"rougail.leader.username": "test_multi_username2",
"rougail.leader.secret": "test_multi_password2"
} }
] ]
} }

View file

@ -1,6 +1,6 @@
{ {
"errors": [ "errors": [
"cannot execute the \"rbw\" commandline from Bitwarden for \"rougail.secret\": rbw get: couldn't find entry for 'test_secret_': multiple entries found: bitwarden_username_2@test_secret_2, bitwarden_username@test_secret_1\n (1)" "several items found with name \"test_secret_\" from Bitwarden for \"rougail.secret\": \"test_secret_1\", \"test_secret_2\""
], ],
"warnings": [] "warnings": []
} }

View file

@ -1,15 +0,0 @@
---
version: 1.1
username:
description: the username
type: unix_user
default: test_secret_1
bitwarden: true
secret:
description: the secret
type: secret
hidden: true
default: test_secret_1
bitwarden: true

View file

@ -25,7 +25,7 @@ def _test_dictionaries(test_dir):
# loads variables in the tiramisu config # loads variables in the tiramisu config
errors = RougailUserData(config, rougailconfig=rougailconfig).run() errors = RougailUserData(config, rougailconfig=rougailconfig).run()
#expected output #expected output
config_dict = dict(config_to_dict(config.forcepermissive.value.get())) config_dict = dict(config_to_dict(config.value.get()))
ok_file = Path('tests') / 'results' / test_dir.name / 'makedict' / 'bitwarden.json' ok_file = Path('tests') / 'results' / test_dir.name / 'makedict' / 'bitwarden.json'
if not ok_file.is_file(): if not ok_file.is_file():
ok_file.parent.mkdir(parents=True, exist_ok=True) ok_file.parent.mkdir(parents=True, exist_ok=True)
@ -46,6 +46,7 @@ def _test_dictionaries(test_dir):
# } # }
assert expected_errors == errors assert expected_errors == errors
# #
config.property.read_only()
assert expected == config_dict assert expected == config_dict
@ -64,11 +65,6 @@ def test_dictionaries_2_username_secret_invalid():
_test_dictionaries(test_dir / '2_username_secret_invalid') _test_dictionaries(test_dir / '2_username_secret_invalid')
def test_dictionaries_2_username_secret_hidden():
"tests the output"
_test_dictionaries(test_dir / '2_username_secret_hidden')
def test_dictionaries_3_leadership_secret(): def test_dictionaries_3_leadership_secret():
"tests the output" "tests the output"
_test_dictionaries(test_dir / '3_leadership_secret') _test_dictionaries(test_dir / '3_leadership_secret')