-
Notifications
You must be signed in to change notification settings - Fork 10
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
implement EKM integration to load private keys during setup #279
Comments
I will split it to 2 PRs:
Second:
|
sounds good |
Here is the 2 questions popped up:
|
Parse each key armored string with
Please add a method to func encryptKey(armoredPrv: String, passphrase: String) throws -> CoreRes.DecryptKey {
let r = try call("encryptKey", jsonDict: ["armored": armoredPrv, "passphrase": passphrase], data: nil)
return try r.json.decodeJson(as: CoreRes.EncryptKey.self)
} Core types: struct EncryptKey: Decodable {
let encryptedKey: String
} Then use |
These keys are received in following JSON: |
Is there a case when keys are encrypted?
trust but verify. there isn’t any case when they would be not decrypted,
but we don’t just assume. we check, and show error if the check ever fails.
// edit: because the data comes from external source, you can't be 100% sure what it is until you verify
|
Should we show an alert warning that keys are not fully decrypted or what's the flow in that case? |
Show an alert and send user back to login screen. They can click |
…ys; (#430) Co-authored-by: ykyivskyi-gd <yevhen.kyivskyi@glassdoor.com> Co-authored-by: Tom J <6306961+tomholub@users.noreply.github.com>
When user creates a new key we call a method from Core |
also, while making a request to get private keys from EKM, we receive array of keys, should we use the first key from array? |
not a typo - you’ll need to parse the result again. some day we could
streamline that and return it parsed, but not now
…On Wednesday, August 4, 2021, Evgenii Kievsky ***@***.***> wrote:
also, while making a request to get private keys from EKM, we receive
array of keys, should we use the first key from array?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#279 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQDZENQDQQYQYYOKIUFWWLT3E7KRANCNFSM4ZQ3DUXA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
--
--
Tom James Holub <http://holub.me/>
|
also, while making a request to get private keys from EKM, we receive
array of keys, should we use the first key from array?
no - we have to save all of the keys. an account can have more than one
private key saved. thats why when you go to settings -> keys, it will
render a list.
…On Wednesday, August 4, 2021, Evgenii Kievsky ***@***.***> wrote:
also, while making a request to get private keys from EKM, we receive
array of keys, should we use the first key from array?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#279 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQDZENQDQQYQYYOKIUFWWLT3E7KRANCNFSM4ZQ3DUXA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
--
--
Tom James Holub <http://holub.me/>
|
our |
check the definition of the issue with regards to handling attester.
for pass phrase, you’ll need to make one pass phrase entity per key, each
with that key’s relevant fingerprint. all the pass phrases will have the
same one string chosen by user, but different fingerprints.
…On Wednesday, August 4, 2021, Evgenii Kievsky ***@***.***> wrote:
array of keys, should we use the first key from array? no - we have to
save all of the keys. an account can have more than one private key saved.
thats why when you go to settings -> keys, it will render a list.
our Passphrase entity creates with fingeprints for one key and there is
updateKey and testWelcome requests on AttesterApi which takes 1 keys, how
should I deal with it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#279 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQDZENN2IURDV3KO6ZREPDT3FE7TANCNFSM4ZQ3DUXA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
--
--
Tom James Holub <http://holub.me/>
|
* Handled empty or not decrypted keys while searching EKM keys; * Added passphrase setup if any key present in EKM; * Created abstract view controller for passphrase creation; Fixed PR comments; * fix bug when more than one key is used * Saving passphrase in memory for EKM flow; Co-authored-by: ykyivskyi-gd <yevhen.kyivskyi@glassdoor.com> Co-authored-by: Tom J <6306961+tomholub@users.noreply.github.com> Co-authored-by: Tom <tom@flowcrypt.com>
EKM = Email Key Manager https://flowcrypt.com/docs/technical/enterprise/email-deployment-overview.html
OrgRule definitions https://flowcrypt.com/docs/business/org-rules.html
As a part of #275 and after #276 and #277 , immediately after authentication when we receive the OIDC and OrgRules, we should check if
orgRules.usesKeyManager() == true
. If yes, we should:GET <ekm>/v1/keys/private
. Into authorization header please putBearer <ID_TOKEN>
. On error, offer retryThe goal is that if user has keys already configured on EKM and appropriate OrgRules are in place, they only need to authenticate and choose a pass phrase, and everything will be done automatically. After authentication and successful automatic setup, they will be sent to their inbox.
In this flow, do not submit any public key to attester.
The text was updated successfully, but these errors were encountered: