Skip to content
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

Edge #50

Merged
merged 27 commits into from
Jan 11, 2023
Merged

Edge #50

Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
765add8
Created deploy script for handling multiple (per-branch) deployments
gsvarovsky Jul 27, 2022
a523054
Corrected detail of security for Cli registration to match implementa…
gsvarovsky Jul 28, 2022
a047682
Added public/private key pair generation for signatures
gsvarovsky Jul 29, 2022
cc1d2ac
Full upgrade to m-ld v0.9 (edge)
gsvarovsky Aug 2, 2022
5c3b017
Merge branch 'main' into edge
gsvarovsky Aug 3, 2022
4a0ed77
m-ld/m-ld-security-spec#3: Added public/private key pair for all user…
gsvarovsky Aug 5, 2022
2f7b05e
m-ld/m-ld-security-spec#3: Added audit logging to audit store (Logz.io)
gsvarovsky Aug 5, 2022
e2bb274
m-ld/m-ld-security-spec#3: Including full timesheet ID in audit logs …
gsvarovsky Aug 6, 2022
f952554
Moved publish to bash script
gsvarovsky Aug 7, 2022
03f416b
0.2.0-edge.0
gsvarovsky Aug 7, 2022
eed9ebd
Missing commit of package versions from prerelease
gsvarovsky Aug 7, 2022
efa06e5
Bugfix: no principal in Gateway domain, but was trying to sign
gsvarovsky Aug 7, 2022
2b422a9
version-packages
gsvarovsky Aug 7, 2022
971f9cb
0.2.0-edge.1
gsvarovsky Aug 7, 2022
b60a4c1
Re-enabled PlantUML SVG output
gsvarovsky Aug 8, 2022
4b3a763
Merge branch 'server-bind-config' into edge
gsvarovsky Nov 14, 2022
ea3697d
#91: Functional merge of main & edge
gsvarovsky Nov 21, 2022
705d2b4
Upgrade to m-ld-cli@edge (ci fix candidate)
gsvarovsky Nov 21, 2022
f3af85f
CI fix: removed local file: link to m-ld
gsvarovsky Nov 21, 2022
214bf79
#74: Removing logz.io dependency
gsvarovsky Nov 23, 2022
5d48447
Merge branch 'main' into edge
gsvarovsky Jan 7, 2023
da43d68
Bumped connectors to minor version
gsvarovsky Jan 9, 2023
2832cc4
version-packages
gsvarovsky Jan 9, 2023
bbb8a25
0.2.0-edge.2
gsvarovsky Jan 9, 2023
c92ff5a
Update to docker deployment
gsvarovsky Jan 10, 2023
ccfb70b
Removed redundant configuration file
gsvarovsky Jan 11, 2023
1e4ddbc
Merge branch 'main' into edge
gsvarovsky Jan 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions architecture/security/accounts.class.puml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,12 @@ Account "client" *--> "*" Project

class UserAccount {
email : string [1..*]
keyid : string [*]
key : UserKey [*]
}
note left of UserAccount::email
Registered email, used
for account activation
end note
note left of UserAccount::keyid
Matches ""ably.key""
Can be revoked
end note
UserAccount --|> Account

class OrganisationAccount {
Expand Down Expand Up @@ -123,6 +119,22 @@ note bottom on link
account<sub>p</sub>.vf:primaryAccountable
end note

class UserKey {
public : base64Binary
private : base64Binary
}
note top of UserKey
Matches ""ably.key""
Can be revoked
""@id = ".${keyid}"""
end note
note left of UserKey::private
encrypted with
AblyKey.secret
end note

UserAccount "1" -- "*" UserKey

package Ably <<service>> {
class AblyKey {
keyid
Expand All @@ -139,7 +151,7 @@ package Ably <<service>> {
timesheet access
end note

UserAccount "1" -- "*" AblyKey
UserKey "1" -- "1" AblyKey
}

@enduml
66 changes: 31 additions & 35 deletions architecture/security/img/register-cli.seq.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 15 additions & 17 deletions architecture/security/register-cli.seq.puml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
hide footbox

User -> CLI ++: open account/timesheet
alt No ""ably.key"" or expired
alt No user configured
note over CLI
configured user is account<sub>u</sub>.
Not always the same as requested timesheet
account<sub>p</sub> (which may be an organisation).
end note
CLI -> User: "your account?"
User --> CLI: account<sub>u</sub>
end
alt No Ably Key (AbK) or expired
note over CLI
configured user is account<sub>u</sub> (required).
Not always the same as requested timesheet
account (which may be an organisation).
end note
CLI -> User: "pls enter email"
User --> CLI: email
CLI -> Gateway ++: jwe(account<sub>u</sub>, email)
Expand All @@ -31,19 +27,21 @@ alt No ""ably.key"" or expired
CLI -> CLI: decrypt jwt<sub>a</sub>
' TODO: replay attack within JWT validity period
CLI -> Gateway ++: key(jwt<sub>a</sub>)

Gateway -> Gateway: create Account\nif required
Gateway <-> Ably: create/update key\n& capabilities
Gateway -> Gateway: store keyid\nin Account
return ""ably.key""
Gateway <-> Ably: create/update Ably key\n(AbK) & capabilities
Gateway -> Gateway: generate RSA key\npair for signing\n⦉ SK, PK ⦊
Gateway -> Gateway: encrypt SK with AbK\n{ SK }<sub>AbK</sub>
Gateway -> Gateway: ⦉ AbK.id ↦ { SK }<sub>AbK</sub>, PK ⦊\nstored in Account
return AbK, SK
end

CLI -> Gateway ++: config(account/timesheet, jwt<sub>u</sub>)
note left
jwt<sub>u</sub> (user jwt)
is ⦉ account<sub>u</sub>, keyid ⦊
signed with ""ably.key""
jwt<sub>u</sub> (user jwt) has
{ account<sub>u</sub>, AbK.id }<sub>AbK</sub>
end note
Gateway -> Gateway: check account<sub>u</sub>\ncorresponds to keyid
Gateway -> Gateway: check account<sub>u</sub>\ncorresponds to AbK.id
Gateway -> Gateway: check account<sub>u</sub> has\naccess to timesheet
Gateway -> Gateway: update key capability
return config
Expand Down
Loading