-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added E2E tests using the SQLiteKIM #529
Merged
MattDavis00
merged 1 commit into
parallaxsecond:feature-sqlite-kim
from
MattDavis00:feature-sqlite-e2e-tests
Sep 21, 2021
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
[core_settings] | ||
# The CI already timestamps the logs | ||
log_timestamp = false | ||
log_error_details = true | ||
|
||
# The container runs the Parsec service as root, so make sure we disable root | ||
# checks. | ||
allow_root = true | ||
|
||
[listener] | ||
listener_type = "DomainSocket" | ||
timeout = 200 # in milliseconds | ||
socket_path = "/tmp/parsec.sock" | ||
|
||
[authenticator] | ||
auth_type = "Direct" | ||
admins = [ { name = "list_clients test" }, { name = "1000" }, { name = "client1" }, { name = "spiffe://example.org/parsec-client-1" } ] | ||
#workload_endpoint="unix:///tmp/agent.sock" | ||
|
||
[[key_manager]] | ||
name = "sqlite-manager" | ||
manager_type = "SQLite" | ||
database_path = "./kim-mappings/sqlite/sqlite-key-info-manager.sqlite3" | ||
|
||
[[provider]] | ||
provider_type = "MbedCrypto" | ||
key_info_manager = "sqlite-manager" | ||
|
||
[[provider]] | ||
provider_type = "Tpm" | ||
key_info_manager = "sqlite-manager" | ||
tcti = "mssim" | ||
owner_hierarchy_auth = "tpm_pass" | ||
|
||
[[provider]] | ||
provider_type = "Pkcs11" | ||
key_info_manager = "sqlite-manager" | ||
library_path = "/usr/local/lib/softhsm/libsofthsm2.so" | ||
user_pin = "123456" | ||
# The slot_number mandatory field is going to replace the following line with a valid number | ||
# slot_number | ||
|
||
[[provider]] | ||
provider_type = "CryptoAuthLib" | ||
key_info_manager = "sqlite-manager" | ||
device_type = "always-success" | ||
iface_type = "test-interface" | ||
# wake_delay = 1500 | ||
# rx_retries = 20 | ||
# # i2c parameters for i2c-pseudo proxy | ||
# slave_address = 0xc0 | ||
# bus = 1 | ||
# baud = 400000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering, if we are going to promote the SQL KIM as the default KIM from now on, if we should change all config files to use the SQL KIM and add that
if
case for the legacy KIM.Also, we might need stability/persistence tests for it: that old mappings stored with that KIM can still be read in current PRs. Check the "per provider key mappings tests" here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was also wondering whether we should make it the default. The reason it is currently only the subset of tests (
all_providers::normal
) is that quite a few of the E2E tests currently rely on the fact that theOnDiskKIM
is able to store keys with the same name in different providers. Tests that rely on this logic obviously fail. Quite a few of the E2E tests would therefore need refactoring to account for this, hence why I went with this approach for now 😅 better to have some E2E tests that none.As for stability tests I already have an issue tracking this here that hopefully somebody will pick up, or me when I'm back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice that you already thought about stability in an issue 👍
Understand about the refactoring needed for the tests. Could you please open an extra-issue about "Making the SQL KIM the default" to track what needs to be done for it?
I am fine to merge this PR then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do