Firebase backend for My Shared Air
Needs Node 10 to work.
(cd function && yarn && yarn build)
firebase emulators:start
Collection for contact events from people who've got infected.
{
token: string, // Id from Bluetooth handshake
}
Get | Create | Update | Delete |
---|---|---|---|
Anyone | Anyone with an document in dataAuthorizations, i.e. confirmed infection | Nobody | Nobody |
Authorizations of users that are allowed to share their data in the network. Issues by licensed healthcare practitioners.
{
_id: string // App ID of infected user
bankIdCompletionData: {
cert: {
notAfter: string, // End of BankID validity, Unix ms
notBefore: string, // Start of BankID validity, Unix ms
},
device: {
ipAddress: string // IP address of the user agent
},
ocspResponse: string, // Base64-encoded signned OCSP response
signature: string, // Base64-encoded XML signature
user: {
givenName: string,
name: string,
personalNumber: string,
surname: string,
},
},
type: 'hcp' // Healthcare practicer
}
Get | Create | Update | Delete |
---|---|---|---|
Nobody | Nobody | Nobody | Nobody |
Licensed healthcare practitioners.
{
_id: string,
personalNumberHash: string // SHA-3-512 encoded
}
Get | Create | Update | Delete |
---|---|---|---|
Nobody | Nobody | Nobody | Nobody |
Device registration tokens.
{
_id: string, // User ID
token: string
}
Get | Create | Update | Delete |
---|---|---|---|
Nobody | Anyone, if _id = auth.uid |
Nobody | Nobody |