-
Notifications
You must be signed in to change notification settings - Fork 6
feat(core): add TDF encrypt/decrypt commands and authentication to platform SDK #115
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
Conversation
…e auth flow flags to kebab case
|
Hey @jakedoublev , cool feature! I've been playing with this over the last few days and noticed that it just started working (at least with the configuration I'm using). On my machine, I'm standing up the platform according to the platform "Run" section, here: https://github.com/opentdf/platform#run . Once the platform is running, I've been doing the following: # Checkout this branch
git checkout feat/tdf-demo
# Build `otdfctl`
make
# Get Help
cp otdfctl.yaml target/ && pushd target && { ./--darwin-arm64 --help ; } && popd
# Authenticate
cp otdfctl.yaml target/ && pushd target && { ./--darwin-arm64 auth client-credentials --client-id opentdf --client-secret secret --log-level DEBUG ; } && popd
# Encrypt
#
# NOTE: This will create a file 'sensitive.txt.tdf'
cp otdfctl.yaml target/ && pushd target && { echo "Some string" | ./--darwin-arm64 encrypt || echo "Failed to encrypt" ; } && popd
# Decrypt
cp otdfctl.yaml target/ && pushd target && { ./--darwin-arm64 decrypt sensitive.txt.tdf -o decrypted.txt || echo "Failed to decrypt" ; } && popdPreviously I'd get an error about DPoP: As of this morning, I'm not getting this error message! 🎉 I'm guessing one of the recent platform commits (e.g. maybe this DPoP change?) has unlocked this for me. Of course, that's a total guess, and doesn't really matter 😃 That said, there does seem to be a small bug in the |
|
@b-long Yes the DPoP change makes it optional since we've been having some issues supporting DPoP across IdPs given that it is still a proposed standard. Thanks for trying this out and giving feedback! |
|
@jakedoublev @jrschumacher Here comes a "stupid question" from me, so apologies in advance as I'm just learning golang. Is this a reasonable fix to If not, can you provide guidance about how it can be improved? |
|
@b-long Thanks for your engagement, and glad you're excited about this feature. :) I think your proposed fix for Flag Would the flow |
|
Personally, I like having
That said, I also think it's nice to have an option to write to STDOUT. I like both 🙂 RE: Your other points:
I'm not too worried about the logging behavior. Except, if you remove the
I agree, piping is a useful feature 👍
Happy to use any flag, but I think the feature (write to a file, explicitly) is useful. 👍
I think if we made this the only option , we'd be losing something that seems valuable 🤷 |
|
Last thing, just to clarify. The My PR was just meant to fix it, not introduce it 🙂 |
Closes #105
Closes #75
Will handle #129 separately