Giter Site home page Giter Site logo

ex_aws_kms's People

Contributors

artkay avatar benwilson512 avatar bernardd avatar bmuller avatar bratsche avatar hexedpackets avatar marramgrass avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ex_aws_kms's Issues

Maintainer Wanted

Hey @hirocaster, per https://elixirforum.com/t/proposal-exaws-2-0/9269 the ExAws project is splitting out each service into its own project.

You are the original contributor the KMS service to ExAws. If you wish to be its maintainer, please let me know and I will give you commit access to this repository. If you do not want this, let me know and I will look for someone else.

Thank you!

Release version 2.1.0 for hex.pm

I think you should publish version 2.1.0 for hex.pm

ref #5

But, I don't have permission for hex.pm.

If you don't mind, can you release it? @benwilson512

memo: Don't forget to change README.md

def deps do
  [
    {:ex_aws, "~> 2.1"},
    {:ex_aws_kms, "~> 2.1"},
    {:poison, "~> 3.0"},
    {:hackney, "~> 1.9"},
  ]
end

Encrypt issues

  • Do not use the issues tracker for help or support (try Elixir Forum, Slack, IRC, etc.)
  • Questions about how to contribute are fine.

Environment

  • Elixir & Erlang versions (elixir --version): 24/1.12.2
  • ExAws version mix deps |grep ex_aws: 2.2.2 (ex_aws_kms version 2.2.0)
  • HTTP client version. IE for hackney do mix deps | grep hackney: 1.17.4

Current behavior

encrypt() doesn't currently work as you'd expect it to. KMS encrypt requires the plaintext value to be base64 encoded. Currently the library doesn't do this so you end up with a bad value.

I have verified that the problem is in the encrypt by using the aws cli to decrypt the ciphertext.

Here's an example.

`ExAws.KMS.encrypt("key-id", "foobar") |> ExAws.request

returns the Ciphertext value of "AQICAHhP4M1Q/HWR0J90p6ShL/0jKkUUrexGH4YlNL6o4thjYAG7Gjzq7UMO5L+BemSIJsVFAAAAYjBgBgkqhkiG9w0BBwagUzBRAgEAMEwGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMx+BQnTksyPLvqTxaAgEQgB8IpvmwFBSNa/wYY3lDxpjO1w7HbQ8vLOflmx2EI5d3"

and when you decrypt this using
ExAws.KMS.decrypt("AQICAHhP4M1Q/HWR0J90p6ShL/0jKkUUrexGH4YlNL6o4thjYAG7Gjzq7UMO5L+BemSIJsVFAAAAYjBgBgkqhkiG9w0BBwagUzBRAgEAMEwGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMx+BQnTksyPLvqTxaAgEQgB8IpvmwFBSNa/wYY3lDxpjO1w7HbQ8vLOflmx2EI5d3") |> ExAws.request!

You get back a plaintext value: foobag=='`

Expected behavior

When you encrypt "foobar", decrypt on the resulting ciphertext should return "foobar".

As I see it, possibly the most idiomatic way may be to switch the parameter order in encrypt to have the ciphertext first then the key then opts so you can use it in a pipe Base.encode64("value") |> ExAws.KMS.encrypt("key-id", opts) |> ExAWS.request!

Of course, you could always do Of course, you could always do b64_value = Base.encode64("foobar") then ExAws.KMS.encrypt(b64_value, "key-id") but that's not very idiomatic as it prevents you from piping a base64 value into encrypt.

I will submit a PR for your consideration that reverses the parameter order in encrypt()

Please let me know if I'm way off base with this and what a better way would be? I'm still learning elixir.

ex_aws_kms doesn't work with ex_aws version 2.1.0

Hello, thanks for this library.

I'm trying to update ex_aws to version 2.1.0 but ex_aws_kms requires ex_aws v2.0

config in mix.exs

_ -> {:ex_aws, "~> 2.0"}

Environment

  • Elixir & Erlang versions (elixir --version):

Elixir 1.7.4 (compiled with Erlang/OTP 21)

  • ExAws version mix deps |grep ex_aws

ex_aws (Hex package) (mix)
locked at 2.0.2 (ex_aws) 8df2f96f

  • HTTP client version. IE for hackney do mix deps | grep hackney

hackney 1.14.3 (Hex package) (rebar3)
locked at 1.14.3 (hackney) b5f6f5dc

Current behavior

Doesn't compile with ex_aws v2.1.0

Expected behavior

Compiles with ex_aws v2.1.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.