Repository navigation
feat: show the submitter of an enclave job every data owner's approval - #9647
Merged
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
print(job), it previously saw only "Requested". Now, once the enclave has distributed the job, it also sees the two rows a data owner (DO) sees since feat: show every data owner's approval of an enclave job to each data owner #9629, with a line per DO:JobInfo.read_permission_rows(), and its override inEnclaveJobInfo, is renamed toread_permissions_repr_rows(), because it gives the rows that the job's repr shows. It is a public method, but only the job repr,str(job)and the tests call it.Guidelines
High level
Mid level
Low level
Security
The submitter can now read every DO's approval file: its decision and when it made it, the files it approved and for whom, and its rejection reason. Before, only the enclave and the DOs could. No dataset contents are in the file. The submitter cannot write any approval file, and a DO can still write only its own; the enclave drops any other change. The test checks this.
The enclave's decision to run a job does not change:
run_jobsstarts a job only once every DO in its config approved this exact submission, and no DO and not the submitter can write the job's state or owner record, which start a run.The signed receipt already told the submitter which DOs approved and when, after the run. The job view does not read the receipt.
Testing
test_owners_and_submitter_see_every_approval(wastest_data_owner_sees_every_owner_approval): the submitter sees the same rows as DO 1, every party may read DO 2's approval file, and only DO 2 may write it.test_owners_and_submitter_see_every_approvalalso checks that DO 1's status is pending after its own approval, and that every party sees rejected after DO 2 rejects.test_run_jobs_waits_for_every_data_owner:run_jobsdoes not start a job that only DO 1 approved, and starts it once DO 2 approved too. No DO and not the submitter can write the job's state or owner record.test_enclave_without_data_owners_never_approves: with no DOs configured, the enclave's status stays pending, even when the state says approved.just test-unit-fastand the syft-enclave and syft-job tests pass.Asana task