[Crypto-Vote] Update-Actions For Crypto-vote
Overview of Crypto-Vote Update-Actions
The crypto-vote feature requires an update of the actions to support the changes to the models.yml. This article outlines the necessary actions to be taken to support the crypto-vote feature.
Update of Meeting and Meeting User Fields
The fields meeting/crypt_default_secretary_id
and meeting/crypt_default_auditor_id
need to be updated by the client. It is unclear whether a new action should be created for this or an existing action that updates meta-data of a meeting should be used. These fields have a low priority, and work on other services can continue without implementing this feature.
However, the fields meeting_user/crypt_default_secretary_in_meeting_id
and meeting_user/crypt_default_auditor_in_meeting_id
are the back-relations and should be updated in the same action. Like the meeting fields, these fields also have a low priority.
Meeting and Meeting User Fields Update Action
The update action for meeting and meeting user fields should be designed to handle the following:
- Update
meeting/crypt_default_secretary_id
andmeeting/crypt_default_auditor_id
fields - Update
meeting_user/crypt_default_secretary_in_meeting_id
andmeeting_user/crypt_default_auditor_in_meeting_id
fields
The action should be able to handle both the update of meeting fields and the update of meeting user fields in a single action.
Existing Action for Meeting Meta-Data Update
If an existing action that updates meta-data of a meeting is used, the following should be considered:
- The existing action should be able to handle the update of
meeting/crypt_default_secretary_id
andmeeting/crypt_default_auditor_id
fields - The existing action should be able to handle the update of
meeting_user/crypt_default_secretary_in_meeting_id
andmeeting_user/crypt_default_auditor_in_meeting_id
fields
New Action for Meeting and Meeting User Fields Update
If a new action is created for the update of meeting and meeting user fields, the following should be considered:
- The new action should be able to handle the update of
meeting/crypt_default_secretary_id
andmeeting/crypt_default_auditor_id
fields - The new action should be able to handle the update of
meeting_user/crypt_default_secretary_in_meeting_id
andmeeting_user/crypt_default_auditor_in_meeting_id
fields
Update of Poll Fields
The fields poll/crypt_secretary_id
and poll/crypt_auditor_id
with their back-relations meeting_user/crypt_secretary_for_poll_ids
and meeting_user/crypt_auditor_for_poll_ids
need to be updated with the action to create/update a poll.
Action to Create/Update a Poll
The action to create/update a poll should be designed to handle the following:
- Update
poll/crypt_secretary_id
andpoll/crypt_auditor_id
fields - Update
meeting_user/crypt_secretary_for_poll_ids
andmeeting_user/crypt_auditor_for_poll_ids
fields
Action to Update Poll Fields
If a separate action is created to update poll fields, the following should be considered:
- The action should be able to handle the update of
poll/crypt_secretary_id
andpoll/crypt_auditor_id
fields - The action should be able to handle the update of
meeting_user/crypt_secretary_for_poll_ids
andmeeting_user/crypt_auditor_for_poll_ids
fields
Update of Poll Key Fields
The fields poll/crypt_key_secretary
and poll/crypt_key_auditor
need probably their own action. Only the corresponding poll-assistant is allowed to call it.
Action to Update Poll Key Fields
The action to update poll key fields should be designed to handle the following:
- Update
poll/crypt_key_secretary
andpoll/crypt_key_auditor
fields
Security Considerations
The action to update poll key fields should be designed with security in mind. Only the corresponding poll-assistant should be able to call this action.
Update of Poll Stop Action
When the vote-service is called, the result has to be handled differently on crypto-votes. Normally, the result-object from the vote-service is {"user_ids": [...], "votes": [...]}
. For a crypto-poll, it is {"user_ids": [as before], "poll_documents": "BASE64"}
. The backend only has to write the poll_documents
-data into the field poll/crypt_documents
.
Action to Update Poll Stop Action
The action to update the poll stop action should be designed to handle the following:
- Handle the result-object from the vote-service differently for crypto-votes
- Write the
poll_documents
-data into the fieldpoll/crypt_documents
Security Considerations
The action to update the poll stop action should be designed with security in mind. The backend should only write the poll_documents
-data into the field poll/crypt_documents
and not modify any other data.
Conclusion
Frequently Asked Questions
This article answers some of the frequently asked questions related to the crypto-vote update-actions.
Q: What is the purpose of the crypto-vote update-actions?
A: The crypto-vote update-actions are designed to support the changes to the models.yml and to handle the update of meeting and meeting user fields, poll fields, and poll key fields.
Q: What are the low-priority fields that need to be updated?
A: The low-priority fields that need to be updated are meeting/crypt_default_secretary_id
and meeting/crypt_default_auditor_id
, and their back-relations meeting_user/crypt_default_secretary_in_meeting_id
and meeting_user/crypt_default_auditor_in_meeting_id
.
Q: What is the difference between the result-object from the vote-service for a normal poll and a crypto-poll?
A: The result-object from the vote-service for a normal poll is {"user_ids": [...], "votes": [...]}
, while for a crypto-poll it is {"user_ids": [as before], "poll_documents": "BASE64"}
.
Q: How does the backend handle the result-object from the vote-service for a crypto-poll?
A: The backend only writes the poll_documents
-data into the field poll/crypt_documents
and does not modify any other data.
Q: What is the security consideration for the action to update poll key fields?
A: Only the corresponding poll-assistant is allowed to call the action to update poll key fields.
Q: What is the security consideration for the action to update the poll stop action?
A: The backend should only write the poll_documents
-data into the field poll/crypt_documents
and not modify any other data.
Q: Can the existing action that updates meta-data of a meeting be used to update the meeting and meeting user fields?
A: Yes, the existing action that updates meta-data of a meeting can be used to update the meeting and meeting user fields.
Q: Should a new action be created to update the meeting and meeting user fields?
A: It depends on the design of the existing action and the requirements of the crypto-vote feature.
Q: What is the priority of the fields that need to be updated?
A: The fields meeting/crypt_default_secretary_id
and meeting/crypt_default_auditor_id
have a low priority, while the fields meeting_user/crypt_default_secretary_in_meeting_id
and meeting_user/crypt_default_auditor_in_meeting_id
also have a low priority.
Q: Can the work on other services continue without implementing the crypto-vote feature?
A: Yes, the work on other services can continue without implementing the crypto-vote feature.
Conclusion
The crypto-vote update-actions are designed to support the changes to the models.yml and to handle the update of meeting and meeting user fields, poll fields, and poll key fields. The security considerations for the actions to update poll key fields and the poll stop action are also important. The priority of the fields that need to be updated and the possibility of using the existing action to update the meeting and meeting user fields are also discussed.