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

Prepare release with updates to certificates, config files, readme and other documentation #41

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
de31fd0
Adds contributing guide and CoD
kipparker Jul 29, 2024
ad7bfcc
Add MIT license
kipparker Jul 29, 2024
f68ba81
Corrects CN for client csr
kipparker Jul 29, 2024
1a5f18e
Correct .github action to align with new ruff syntax
kipparker Jul 29, 2024
cafe531
Change the CN value for the client CSR
kipparker Jul 29, 2024
4c26d9d
Add a note to the readme about the directory
kipparker Jul 29, 2024
e129739
Restore client certificate checking in nginx conf
kipparker Jul 29, 2024
0f13738
Correct type of client certificate in token issuing endpoint
kipparker Jul 29, 2024
0d2dd84
Merge pull request #40 from icebreakerone/kip/certificates
kipparker Jul 30, 2024
f14b971
Merge pull request #39 from icebreakerone/kip/add-license
kipparker Jul 30, 2024
8b982ea
Improve use of env variables and documentation
kipparker Jul 29, 2024
cbddfb1
Remove references to .CLIENT_SECRET, change to .OAUTH_CLIENT_SECRET
kipparker Jul 30, 2024
f06465c
Fix test failing due to missing defaults
kipparker Jul 30, 2024
39c9edf
Align naming in examples file with new OAUTH_* naming, remove a debug…
kipparker Jul 30, 2024
e6b813b
Corrections and clarifications
kipparker Jul 30, 2024
82b4b5a
Merge branch 'preprod' into kip/configuration-defaults
kipparker Jul 31, 2024
8ea1cf6
Add email to CoD
kipparker Jul 31, 2024
3e55d3b
Merge pull request #38 from icebreakerone/kip/add-contributing-doc
kipparker Jul 31, 2024
ceb3344
Link to ory hydra segment from environment variables explanation
kipparker Aug 1, 2024
95d4041
Merge pull request #42 from icebreakerone/kip/configuration-defaults
kipparker Aug 1, 2024
da23706
Remove introspection endpoint, implement signature and certificate bi…
kipparker Aug 20, 2024
41d052b
remove unused imports
kipparker Aug 20, 2024
91644e1
remove duplication of cert parsing
kipparker Aug 20, 2024
fec8d69
Add auth tests
kipparker Aug 20, 2024
f9cb06c
Fix ruff errors
kipparker Aug 20, 2024
76b5f7a
Repeat require_role logic in resource api
kipparker Aug 21, 2024
95c82d9
Remove print
kipparker Aug 21, 2024
60b40eb
Refactor tests
kipparker Aug 21, 2024
a9dbd65
Fix ruff failures on pytest fixtures
kipparker Aug 21, 2024
2255627
Improve test fixtures
kipparker Aug 21, 2024
9ecffa2
Better naming for the role checking function
kipparker Aug 21, 2024
b29f143
Working on resource to integrate new certificates
kipparker Sep 2, 2024
02fc8c1
New style certificates for resource api
kipparker Sep 2, 2024
a75dfb8
update certmaker to add extensions
kipparker Sep 3, 2024
a9fcb98
Aligns authentication tests with new functions
kipparker Sep 3, 2024
52c0042
Remove unnecessary stuff from authentication tests
kipparker Sep 3, 2024
caf8222
Remove star imports, unused imports
kipparker Sep 3, 2024
b1a3976
Fix aud and client_id references
kipparker Sep 4, 2024
4d727a3
Fix imports
kipparker Sep 4, 2024
afaf3a5
Merge pull request #45 from icebreakerone/kip/remove-introspection
kipparker Sep 4, 2024
e860f2b
Upgrade actions to latest versions
kipparker Sep 4, 2024
8e4a883
Merge pull request #47 from icebreakerone/kip/update-actions
kipparker Sep 4, 2024
e2efa24
Align with the new ib1 directory package
kipparker Oct 17, 2024
88411ed
Remove unused imports
kipparker Oct 17, 2024
bf5b6d1
Merge pull request #49 from icebreakerone/kip/integrate-directory-lib…
kipparker Nov 4, 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
8 changes: 4 additions & 4 deletions .github/templates/test/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: test
description: Run python tests
inputs:
folder:
description: 'The folder to run tests in'
folder:
description: "The folder to run tests in"
required: true

runs:
Expand All @@ -19,10 +19,10 @@ runs:
run: |
# stop the build if there are Python syntax errors or undefined names
cd ${{ inputs.folder }}
pipenv run ruff .
pipenv run ruff check .
- name: Run ${{ inputs.folder }} tests
shell: bash
run: |
# stop the build if there are Python syntax errors or undefined names
cd ${{ inputs.folder }}
pipenv run pytest .
pipenv run pytest .
6 changes: 3 additions & 3 deletions .github/workflows/deploy_authentication.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ env:
AWS_REGION: eu-west-2 # set this to your preferred AWS region, e.g. us-west-1

jobs:
deploy-prod:
deploy-authentication-prod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy_authentication_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ env:
AWS_REGION: eu-west-2 # set this to your preferred AWS region, e.g. us-west-1

jobs:
deploy-dev:
deploy-authentication-dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy_resource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ env:
AWS_REGION: eu-west-2 # set this to your preferred AWS region, e.g. us-west-1

jobs:
deploy-prod:
deploy-resource-prod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy_resource_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ env:
AWS_REGION: eu-west-2 # set this to your preferred AWS region, e.g. us-west-1

jobs:
deploy-dev:
deploy-resource-dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ __pycache__

certs
requirements.txt
.python-version
.python-version

.vscode

*.pem
116 changes: 116 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Code of Conduct - Perseus Demo Energy

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or
advances
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate,
threatening, offensive, or harmful.

Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will
communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at [email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org/), version
[1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct/code_of_conduct.md) and
[2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md),
and was generated by [contributing-gen](https://github.com/bttger/contributing-gen).
118 changes: 118 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<!-- omit in toc -->

# Contributing to Perseus Demo Energy

## Table of Contents

- [Code of Conduct](#code-of-conduct)
- [Asking questions](#asking-questions)
- [Contributing](#contributing)
- [Reporting Bugs](#reporting-bugs)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Improving The Documentation](#improving-the-documentation)
- [Commit Messages](#commit-messages)

## Code of Conduct

This project and everyone participating in it is governed by the
[Perseus Demo Energy Code of Conduct](https://github.com/icebreakerone/perseus-demo-energyblob/master/CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable behavior
to [[email protected]](mailto:[email protected]).

## Asking questions

### Perseus participants

A slack channel is available for participants building prototypes for the Perseus trust framework pilot, and is the best place to ask questions. If you are not part of the slack channel and wish to have access, please email [[email protected]](mailto:[email protected])

### Other users

Before you ask a question, it is best to search for existing [Issues](https://github.com/icebreakerone/perseus-demo-energy/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue.

If you then still feel the need to ask a question and need clarification, we recommend the following:

- Open an [Issue](https://github.com/icebreakerone/perseus-demo-energy/issues/new).
- Provide as much context as you can about what you're running into.
- Provide project and platform versions, depending on what seems relevant.
- If relevant, include screenshots or error messages.
- If you have a question about a specific part of the project, please include the link to the file or the line number.

We will then take care of the issue as soon as possible.

## Contributing

> ### Legal Notice <!-- omit in toc -->
>
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.

### Reporting Bugs

<!-- omit in toc -->

#### Before Submitting a Bug Report

Please complete the following steps in advance to help us fix any potential bug as fast as possible.

- Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://github.com/icebreakerone/perseus-demo-energy/blob/main/README.md). If you are looking for support, you might want to check [this section](#asking-questions)).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/icebreakerone/perseus-demo-energyissues?q=label%3Abug).
- Collect information about the bug:
- Stack trace (Traceback)
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
- Possibly your input and the output

#### How Do I Submit a Good Bug Report?

> Please do not report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs should be sent by email to [email protected]

We use GitHub issues to track bugs and errors. If you run into an issue with the project:

- Open an [Issue](https://github.com/icebreakerone/perseus-demo-energy/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
- Explain the behavior you would expect and the actual behavior.
- Please provide as much context as possible and describe the _reproduction steps_ that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
- Provide the information you collected in the previous section.

Once it's filed, we will label the issue accordingly and work on it as soon as possible.

### Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for Perseus Demo Energy, **including completely new features and minor improvements to existing functionality**.

#### Before Submitting an Enhancement

- Make sure that you are using the latest version.
- Read the [documentation](https://github.com/icebreakerone/perseus-demo-energy/blob/main/README.md) carefully and find out if the functionality is already covered, maybe by an individual configuration.
- Perform a [search](https://github.com/icebreakerone/perseus-demo-energy/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits with the scope and aims of the project. If you are not sure, feel free to ask in the [slack channel](#asking-questions).

#### How Do I Submit a Good Enhancement Suggestion?

Enhancement suggestions are tracked as [GitHub issues](https://github.com/icebreakerone/perseus-demo-energy/issues).

- Use a **clear and descriptive title** for the issue to identify the suggestion.
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why
- Provide links to code, if applicable

### Improving The Documentation

Feedback on our documentation is always welcome. If you see something that is wrong, missing, or could be explained better, you can help us by creating an issue, or by creating a pull request with the suggested changes.

## Commit Messages

Commit messages should start with a short summary line a.k.a. message subject:

Start with an imperative present active verb: Add, Drop, Fix, Refactor, Optimize, etc.

Use up to 50 characters; this is the git official preference.

Finish without a full-stop.

Example: `Add CONTRIBUTING.md`

This summary can be followed by a longer description where more detail is needed. You can add as much information as you want here.

## Attribution

This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2024 Icebreaker One

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading
Loading