-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
184 lines (175 loc) · 5.82 KB
/
Copy pathmix.exs
File metadata and controls
184 lines (175 loc) · 5.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
defmodule AwsEncryptionSdk.MixProject do
use Mix.Project
@version "1.0.0"
@source_url "https://github.com/riddler/aws-encryption-sdk-elixir"
def project do
[
app: :aws_encryption_sdk,
version: @version,
elixir: "~> 1.16",
start_permanent: Mix.env() == :prod,
deps: deps(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
# Hex package metadata
name: "AWS Encryption SDK",
description: description(),
package: package(),
docs: docs(),
source_url: @source_url,
homepage_url: @source_url
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger, :crypto, :public_key]
]
end
defp deps do
[
{:jason, "~> 1.4"}
] ++
aws_kms_deps() ++
[
{:dialyxir, "~> 1.4", only: [:dev], runtime: false},
{:excoveralls, "~> 0.18.5", only: :test},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:doctor, "~> 0.23.0", only: :dev},
{:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.35", only: :dev, runtime: false},
{:ex_quality, "~> 0.2.0", only: [:dev, :test]}
]
end
# The AWS KMS client stack is optional: raw keyrings (RawAes, RawRsa,
# Multi over raws) need none of it. Consumers who want the AWS KMS
# keyrings add all four to their own deps; everything KMS-shaped in
# lib/ compiles itself out when ExAws is absent.
#
# NO_AWS_DEPS exists for CI only: it drops the stack from this project
# so the workflow can prove the raw-keyring path compiles and passes
# with none of them present. Running `mix deps.get` with it set will
# prune the four from mix.lock - do not commit a lock produced that way.
defp aws_kms_deps do
if System.get_env("NO_AWS_DEPS") do
[]
else
[
{:ex_aws, "~> 2.7", optional: true},
{:ex_aws_kms, "~> 2.6", optional: true},
{:hackney, "~> 4.0", optional: true},
{:sweet_xml, "~> 0.7", optional: true}
]
end
end
defp description do
"""
AWS Encryption SDK for Elixir - client-side encryption compatible with all
official AWS Encryption SDK implementations (Python, Java, JavaScript, C, CLI).
"""
end
defp package do
[
name: "aws_encryption_sdk",
licenses: ["Apache-2.0"],
links: %{
"GitHub" => @source_url,
"Changelog" => "#{@source_url}/blob/main/CHANGELOG.md",
"AWS Encryption SDK Specification" =>
"https://github.com/awslabs/aws-encryption-sdk-specification"
},
files: ~w(lib .formatter.exs mix.exs README.md LICENSE CHANGELOG.md)
]
end
defp docs do
[
main: "readme",
name: "AWS Encryption SDK",
source_ref: "v#{@version}",
source_url: @source_url,
canonical: "https://hexdocs.pm/aws_encryption_sdk",
extras: [
"README.md": [title: "Overview"],
"CHANGELOG.md": [title: "Changelog"],
"CONTRIBUTING.md": [title: "Contributing"],
"guides/getting-started.md": [title: "Getting Started"],
"guides/choosing-components.md": [title: "Choosing Components"],
"guides/security-best-practices.md": [title: "Security Best Practices"],
"guides/STABILITY.md": [title: "API Stability Policy"],
LICENSE: [title: "License"]
],
groups_for_modules: [
"Core API": [
AwsEncryptionSdk,
AwsEncryptionSdk.Client,
AwsEncryptionSdk.Encrypt,
AwsEncryptionSdk.Decrypt,
AwsEncryptionSdk.AlgorithmSuite
],
Materials: [
AwsEncryptionSdk.Materials.EncryptionMaterials,
AwsEncryptionSdk.Materials.DecryptionMaterials,
AwsEncryptionSdk.Materials.EncryptedDataKey
],
"Message Format": [
AwsEncryptionSdk.Format.Message,
AwsEncryptionSdk.Format.Header,
AwsEncryptionSdk.Format.Body,
AwsEncryptionSdk.Format.BodyAad,
AwsEncryptionSdk.Format.EncryptionContext,
AwsEncryptionSdk.Format.Footer
],
Cryptography: [
AwsEncryptionSdk.Crypto.AesGcm,
AwsEncryptionSdk.Crypto.HKDF,
AwsEncryptionSdk.Crypto.ECDSA,
AwsEncryptionSdk.Crypto.HeaderAuth,
AwsEncryptionSdk.Crypto.Commitment
],
"Keyring Interface": [
AwsEncryptionSdk.Keyring.Behaviour
],
"Raw Keyrings": [
AwsEncryptionSdk.Keyring.RawAes,
AwsEncryptionSdk.Keyring.RawRsa,
AwsEncryptionSdk.Keyring.Multi
],
"KMS Keyrings": [
AwsEncryptionSdk.Keyring.AwsKms,
AwsEncryptionSdk.Keyring.AwsKmsDiscovery,
AwsEncryptionSdk.Keyring.AwsKmsMrk,
AwsEncryptionSdk.Keyring.AwsKmsMrkDiscovery
],
"KMS Client Interface": [
AwsEncryptionSdk.Keyring.KmsClient,
AwsEncryptionSdk.Keyring.KmsClient.ExAws,
AwsEncryptionSdk.Keyring.KmsClient.Mock,
AwsEncryptionSdk.Keyring.KmsKeyArn
],
"Cryptographic Materials Managers": [
AwsEncryptionSdk.Cmm.Behaviour,
AwsEncryptionSdk.Cmm.Default,
AwsEncryptionSdk.Cmm.Caching,
AwsEncryptionSdk.Cmm.RequiredEncryptionContext
],
Caching: [
AwsEncryptionSdk.Cache.CryptographicMaterialsCache,
AwsEncryptionSdk.Cache.LocalCache,
AwsEncryptionSdk.Cache.CacheEntry
],
Streaming: [
AwsEncryptionSdk.Stream,
AwsEncryptionSdk.Stream.Encryptor,
AwsEncryptionSdk.Stream.Decryptor,
AwsEncryptionSdk.Stream.SignatureAccumulator
]
],
formatters: ["html"]
]
end
end