Skip to content
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

feat: kms account manager #5

Merged
merged 110 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 107 commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
79d6ad1
feat: add accounts python file
johnson2427 Apr 8, 2024
799b158
feat: accounts container functional
johnson2427 Apr 8, 2024
bfa8fe2
feat: add signing feature
johnson2427 Apr 10, 2024
9f8d9f9
feat: added signable message and eip191
johnson2427 Apr 12, 2024
602685e
feat: attempting to verify DER encoded message
johnson2427 Apr 15, 2024
456e2e3
feat: fix ape version
johnson2427 Apr 17, 2024
fb1e0fe
feat: eth checksum address properly calculated
johnson2427 Apr 22, 2024
37010f2
feat: sign_message fully operational
johnson2427 Apr 22, 2024
692c8ea
feat: cleanup accounts and utils
johnson2427 Apr 23, 2024
59ac686
feat: remove list from eth_account import
johnson2427 Apr 23, 2024
6437521
feat: sign transactions in working state
johnson2427 Apr 25, 2024
c7276e5
feat: rename ape_aws_kms folder and touch up readme
johnson2427 Apr 25, 2024
b79ff59
feat: adding key import, not finished
johnson2427 Apr 25, 2024
6169759
feat: add eip-155 note
johnson2427 Apr 26, 2024
43d6cee
feat: accounts and cli work, fixing sign_transactions
johnson2427 Apr 29, 2024
490578e
feat: change write_to value
johnson2427 Apr 29, 2024
2fa428d
feat: add 312 support
johnson2427 Apr 29, 2024
9390655
feat: move conver_der_to_rsv to utils
johnson2427 Apr 29, 2024
505e958
feat: move functionality around to clean things up
johnson2427 Apr 29, 2024
ca7daf8
feat: remove print
johnson2427 Apr 29, 2024
40c2f61
feat: adding admin features and kms create and delete
johnson2427 Apr 30, 2024
76a3304
feat: add suggested changes for signing transactions
johnson2427 Apr 30, 2024
6f8c33a
feat: remove unused code from utils
johnson2427 Apr 30, 2024
b00d83a
feat: remove check sig
johnson2427 Apr 30, 2024
ce83d4a
feat: pushing up for testing
johnson2427 Apr 30, 2024
4f6e5bd
feat: remove the need to import AwsAccountContainer
johnson2427 May 1, 2024
f82a2e4
feat: add ape_cli_context
johnson2427 May 1, 2024
62b4a61
feat: add cli_ctx use
johnson2427 May 1, 2024
3b972e1
feat: fix bad function call
johnson2427 May 1, 2024
9a82057
feat: reduce function call names
johnson2427 May 1, 2024
4d3fb64
feat: rename admin to iam
johnson2427 May 1, 2024
113098e
feat: flip the order of sign methods
johnson2427 May 1, 2024
f34536b
feat: make sign_raw_hash an internal method
johnson2427 May 1, 2024
2a7c73f
feat: remove unused import
johnson2427 May 1, 2024
9d63486
feat: make some interface changes to client class
johnson2427 May 1, 2024
e136e38
feat: cleanup and move functionality around
johnson2427 May 1, 2024
4091ed5
feat: remove breakpoint and prints
johnson2427 May 1, 2024
5638299
feat: add TODOs
johnson2427 May 1, 2024
7b18fc3
feat: remove breakpoint and prints
johnson2427 May 1, 2024
08ef7e1
feat: remove cached_property from accounts
johnson2427 May 1, 2024
67c3dc8
feat: move v calc around
johnson2427 May 1, 2024
86ea559
feat: move cli functionality to client
johnson2427 May 2, 2024
adee12d
feat: move AliasResponse to client
johnson2427 May 2, 2024
e7ee4bd
feat: remove constants in cli file
johnson2427 May 2, 2024
eebd6c0
feat: remove AliasResponse from utils
johnson2427 May 2, 2024
a81d378
feat: remove unnecessary Field usage
johnson2427 May 2, 2024
672e1ea
feat: add aliases
johnson2427 May 2, 2024
8e1e224
feat: remove Client class
johnson2427 May 2, 2024
f7dc15f
feat: clean up create key model
johnson2427 May 2, 2024
0c5acef
feat: remove 38 and 39 and set ClassVars
johnson2427 May 3, 2024
281a12c
feat: add accounts tests
johnson2427 May 3, 2024
e9af107
refactor: remove <3.10, and add test runners
fubuloubu May 4, 2024
d0d3d4e
chore: set to macOS 12 for bug
fubuloubu May 4, 2024
7e44add
feat: remove conftest file from tests
johnson2427 May 6, 2024
4b8b578
feat: remove breakpoint and check code
johnson2427 May 6, 2024
973236b
feat: add ecdsa to requirements
johnson2427 May 6, 2024
59b08dd
feat: remove accounts from kms cli
johnson2427 May 6, 2024
573181a
feat: keep account a cached_property
johnson2427 May 6, 2024
1df8cf1
feat: remove unnecessary pins for eth-utils and pydantic
johnson2427 May 6, 2024
7809749
feat: add transaction test
johnson2427 May 6, 2024
8e805c2
feat: correction to tests
johnson2427 May 6, 2024
c79c4a0
feat: a working check of the signatures in messages and transactions
johnson2427 May 7, 2024
db811eb
feat: clean up tests
johnson2427 May 7, 2024
a7884fc
feat: get check_signature to work with chain ID
johnson2427 May 7, 2024
4904879
feat: remove aws folder and credentials
johnson2427 May 7, 2024
41b0611
feat: remove scratch files that are no longer required
johnson2427 May 7, 2024
e2767de
feat: remove gitkeep file
johnson2427 May 7, 2024
97dd54e
feat: update setup py file
johnson2427 May 7, 2024
f8e6491
feat: update README
johnson2427 May 7, 2024
9fec71c
feat: update format of md files in github folder
johnson2427 May 7, 2024
cdac3a6
feat: update ape_aws file format
johnson2427 May 7, 2024
456a5a1
feat: remove breakpoint
johnson2427 May 7, 2024
5640b7c
feat: clean up functionality in accounts
johnson2427 May 7, 2024
242bc5b
feat: pin up ape
johnson2427 May 7, 2024
0013ce6
feat: remove ape_cli_context from iam cli tool
johnson2427 May 7, 2024
02a5e1f
refactor: apply suggestions from code review
fubuloubu May 7, 2024
2395060
refactor: remove tags; add clearer arg info about ARNs
fubuloubu May 7, 2024
2660474
docs: add TODO note
fubuloubu May 7, 2024
9d9c45f
refactor: add number of days
fubuloubu May 7, 2024
d54e7ba
docs: add TODO for sign/verify w/ KMS acct
fubuloubu May 7, 2024
13d20a3
fix: run lint 3.10+
fubuloubu May 7, 2024
72a9be4
fix: commitlint 3.10
fubuloubu May 7, 2024
71b431e
fix: release worflow use 3.10
fubuloubu May 7, 2024
409e9b9
fix: pr title check use 3.10
fubuloubu May 7, 2024
2520ec9
fix: f-string error
fubuloubu May 7, 2024
062cdf3
chore: fix mypy stub error
fubuloubu May 7, 2024
73dc846
chore: fix mypy stub error
fubuloubu May 7, 2024
86fe70b
refactor: remove scratch folder
johnson2427 May 7, 2024
bf7d4d5
refactor: cli files
johnson2427 May 7, 2024
9a944ea
fix: testing
johnson2427 May 7, 2024
8675665
fix: update versions
johnson2427 May 7, 2024
678467c
fix: bad type hint
johnson2427 May 7, 2024
7d0e84e
refactor: clean sign_transaction
johnson2427 May 7, 2024
62835e5
fix: type hinting
johnson2427 May 8, 2024
4cb391f
refactor: reorder imports
johnson2427 May 8, 2024
66f1d96
fix: expected type of _sign_raw_hash
johnson2427 May 8, 2024
27128cf
feat: adding aws cli to github workflow
johnson2427 May 8, 2024
5c512aa
feat: add aws access keys
johnson2427 May 8, 2024
dac9ad6
feat: add default region and output for tests
johnson2427 May 8, 2024
f0cf99a
feat: show default profile github actions
johnson2427 May 8, 2024
947c15c
fix: github actions
johnson2427 May 8, 2024
2648b18
fix: run command for aws cli
johnson2427 May 8, 2024
6efc237
feat: use aws-actions
johnson2427 May 8, 2024
9955e56
fix: readme notes
johnson2427 May 8, 2024
1ccccf4
fix: add py.typed file back
johnson2427 May 8, 2024
2054d06
fix: remove empty line readme
johnson2427 May 8, 2024
a1589d3
fix: workflow old versions
johnson2427 May 8, 2024
ded1008
feat: fix commitizen version
johnson2427 May 8, 2024
009d64c
fix: remove unnecessary steps from readme
johnson2427 May 8, 2024
fe9bd33
feat: add cz-requirement file
johnson2427 May 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .aws/config

This file was deleted.

3 changes: 0 additions & 3 deletions .aws/credentials

This file was deleted.

15 changes: 8 additions & 7 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
name: Bug report
about: Report an error that you've encountered.
labels: 'bug'
labels: bug
---

### Environment information

* `ape` and plugin versions:
- `ape` and plugin versions:

```
$ ape --version
Expand All @@ -15,16 +16,16 @@ $ ape plugins list
# ...copy and paste result of above command here...
```

* Python Version: x.x.x
* OS: osx/linux/win
- Python Version: x.x.x
- OS: osx/linux/win

### What went wrong?

Please include information like:

* what command you ran
* the code that caused the failure (see [this link](https://help.github.com/articles/basic-writing-and-formatting-syntax/) for help with formatting code)
* full output of the error you received
- what command you ran
- the code that caused the failure (see [this link](https://help.github.com/articles/basic-writing-and-formatting-syntax/) for help with formatting code)
- full output of the error you received

### How can it be fixed?

Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
name: Feature request
about: Request a new feature, or an improvement to existing functionality.
labels: 'enhancement'
labels: enhancement
---

### Overview

Provide a simple overview of what you wish to see added. Please include:

* What you are trying to do
* Why Ape's current functionality is inadequate to address your goal
- What you are trying to do
- Why Ape's current functionality is inadequate to address your goal

### Specification

Expand Down
21 changes: 14 additions & 7 deletions .github/ISSUE_TEMPLATE/work-item.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,48 @@
---
name: Work item
about: New work item for Ape team
labels: 'backlog'

labels: backlog
---

### Elevator pitch:

<!-- 1-2 line summary of the scope of this work item -->

### Value:

<!--
Who is this for?
Persona or group of people whom will derive value from the scenario.
What benefits will be achieved or business metrics improved?
-->

### Dependencies:

<!-- Call out key people, teams, tech dependencies, or assumptions. -->

### Design approach:

<!--
Free text / diagram / whiteboard picture / etc. that clearly shows your approach and considerations to build the task list.
Existing code patterns in production code base that you will base your work off of.
-->

### Task list:

<!-- Bulleted list describing the exit criteria, desired end state and any documentation, monitors, work for DRI, etc. that will need to be added to make sure someone else can support once it's live. -->
* [ ] Tasks go here

### Estimated completion date:
- [ ] Tasks go here

### Estimated completion date:

### Design review:

<!-- 1-2 people needed for signoff -->

Do not signoff unless:
- 1) agreed the tasks and design approach will achieve acceptance, and
- 2) the work can be completed by one person within the SLA.
Design reviewers should consider simpler approaches to achieve goals.

- 1. agreed the tasks and design approach will achieve acceptance, and
- 2. the work can be completed by one person within the SLA.
Design reviewers should consider simpler approaches to achieve goals.

(Please leave a comment to sign off)
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### What I did

<!-- The `fixes:` field denotes an issue that will be marked resolved by merging this PR -->

fixes: #

### How I did it
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.10"

- name: Install Dependencies
run: pip install .[dev]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.10"

- name: Install dependencies
run: |
Expand Down
29 changes: 19 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.10"

- name: Install Dependencies
run: pip install .[lint]
Expand All @@ -30,12 +30,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.10"

- name: Install Dependencies
run: pip install .[lint,test] # Might need test deps
Expand All @@ -48,20 +48,29 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest] # eventually add `windows-latest`
python-version: [3.7, 3.8, 3.9]
# TODO: Replace with macos-latest when works again.
# https://github.com/actions/setup-python/issues/808
os: [ubuntu-latest, macos-12] # eventually add `windows-latest`
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: pip install .[test]

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Run Tests
run: pytest -m "not fuzzing" -n 0 -s --cov

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/title.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.10"

- name: Install Dependencies
run: pip install commitizen
Expand Down
34 changes: 21 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.5.0
hooks:
- id: check-yaml

- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.9.3
rev: v5.10.1
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 21.10b0
rev: 24.2.0
hooks:
- id: black
name: black

- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910-1
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies: [types-PyYAML, types-requests]
additional_dependencies: [
types-PyYAML,
types-requests,
types-setuptools,
pydantic,
pandas-stubs,
types-SQLAlchemy
]

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
- id: mdformat
additional_dependencies: [mdformat-gfm, mdformat-frontmatter, mdformat-pyproject]


default_language_version:
python: python3.8
python: python3.10
Loading
Loading