QuantConnect / lean-cli

CLI for running the LEAN engine locally and in the cloud
https://www.lean.io/cli
Apache License 2.0
191 stars 100 forks source link

Encrypted Projects with Libraries #380

Closed DerekMelchin closed 7 months ago

DerekMelchin commented 8 months ago

In the Cloud Platform docs, we say

Encrypted projects can use libraries encrypted with the same project key or unencrypted libraries. However, you cannot use a library encrypted with a different project encryption key.

yet this rule isn't enforced with the CLI

D:\qc\workspaces\quantconnect>lean project-create "Library/MyEncryptLibrary"
Successfully created Python project 'Library/MyEncryptLibrary'

D:\qc\workspaces\quantconnect>lean encrypt "Library/MyEncryptLibrary" --key "C:\Users\derek\Desktop\encryption-file2.txt"
Local files encrypted successfully with key C:\Users\derek\Desktop\encryption-file2.txt

D:\qc\workspaces\quantconnect>lean project-create "EncryptTest3"
Successfully created Python project 'EncryptTest3'

D:\qc\workspaces\quantconnect>lean encrypt "EncryptTest3" --key "C:\Users\derek\Desktop\encryption-file.txt"
Local files encrypted successfully with key C:\Users\derek\Desktop\encryption-file.txt

D:\qc\workspaces\quantconnect>lean library add "EncryptTest3" "Library/MyEncryptLibrary"
Adding Lean CLI library D:\qc\workspaces\quantconnect\Library\MyEncryptLibrary to project D:\qc\workspaces\quantconnect\EncryptTest3