Skip to content
Open
Changes from 1 commit
Commits
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
72 changes: 57 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,68 @@
# python-ear
# **python-ear**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

H1 does not need additional emphasis.

Suggested change
# **python-ear**
# python-ear


A python implementation of [draft-fv-rats-ear](https://datatracker.ietf.org/doc/draft-fv-rats-ear/).
A Python library that implements the EAT Attestation Result (EAR) data format, as specified in [draft-fv-rats-ear](https://datatracker.ietf.org/doc/draft-fv-rats-ear/). This library provides implementations for both CBOR-based and JSON-based serialisations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adoption is in flight.

Also, let’s do new-sentence-new-line (NSNL). It’s a good way to make subsequent diffs exactly the right size — BTW, git diff --word-diff is your friend :-)

Suggested change
A Python library that implements the EAT Attestation Result (EAR) data format, as specified in [draft-fv-rats-ear](https://datatracker.ietf.org/doc/draft-fv-rats-ear/). This library provides implementations for both CBOR-based and JSON-based serialisations.
A Python library that implements the EAT Attestation Result (EAR) data format, as specified in [draft-ietf-rats-ear](https://datatracker.ietf.org/doc/draft-ietf-rats-ear/).
This library provides implementations for both CBOR-based and JSON-based serialisations.


# Proposal
---

Following are the tools that will be used in the development of this library
## **Overview**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Suggested change
## **Overview**
## Overview


## CWT and JWT creation
The goal of this project is to standardize attestation results by defining a shared information and data model, enabling seamless integration with other components of the RATS architecture. This focuses specifically on harmonizing attestation results to facilitate interoperability between various verifiers and relying parties.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NSNL

Suggested change
The goal of this project is to standardize attestation results by defining a shared information and data model, enabling seamless integration with other components of the RATS architecture. This focuses specifically on harmonizing attestation results to facilitate interoperability between various verifiers and relying parties.
The goal of this project is to standardize attestation results by defining a shared information and data model, enabling seamless integration with other components of the RATS architecture.
This focuses specifically on harmonizing attestation results to facilitate interoperability between various verifiers and relying parties.


1. [python-cwt](https://python-cwt.readthedocs.io/en/stable/)
2. [python-jwt](https://pypi.org/project/python-jose/)
This implementation was initiated as part of the **Veraison Mentorship** under the Linux Foundation Mentorship Program (**LFX Mentorship**), focusing on the following capabilities:

## Code formatting and styling
- **Populating EAR Claims-Sets:** Define and populate claims that represent evidence and attestation results.
- **Signing EAR Claims-Sets:** Support signing using private keys, ensuring data integrity and authenticity.
- **Encoding and Decoding:**
- Encode signed EAR claims as **CWT** (Concise Binary Object Representation Web Tokens) or **JWT** (JSON Web Tokens).
- Decode signed EARs from CWT or JWT formats, enabling interoperability between different systems.
- **Signature Verification:** Verify signatures using public keys to ensure the authenticity of claims.
- **Accessing Claims:** Provide interfaces to access and manage EAR claims efficiently.

1. [black](https://pypi.org/project/black/)
2. [isort](https://pypi.org/project/isort/)
This library is developed in Python and makes use of existing packages for CWT and JWT management, static code analysis, and testing.

## Linting and static analysis
---

1. [flake8](https://pypi.org/project/flake8/)
2. [mypy](https://pypi.org/project/mypy/)
## **Key Features**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto (there are a few others to fix too.)

Suggested change
## **Key Features**
## Key Features


## Testing
1. **Standards Compliance:**
Implements draft-fv-rats-ear as per IETF specifications to ensure compatibility with the RATS architecture.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Implements draft-fv-rats-ear as per IETF specifications to ensure compatibility with the RATS architecture.
Implements draft-ietf-rats-ear as per IETF specifications to ensure compatibility with the RATS architecture.


1. [pytest](https://pypi.org/project/pytest/)
2. **Token Management:**
- **CWT Support:** Utilizes [python-cwt](https://python-cwt.readthedocs.io/en/stable/) for handling CBOR Web Tokens.
- **JWT Support:** Uses [python-jose](https://pypi.org/project/python-jose/) for JSON Web Tokens management.

3. **Security:**
- Supports signing of EAR claims with private keys and verification with public keys.
- Adopts secure cryptographic practices for token creation and verification.

4. **Static Analysis and Code Quality:**
- Ensures code quality using linters and static analysis tools.
- Maintains type safety and code consistency.

5. **Testing:**
- Comprehensive unit tests using `pytest` to validate all functionalities.

---

## **Technical Stack**

### **Token Creation and Management**

- **CWT:** [python-cwt](https://python-cwt.readthedocs.io/en/stable/)
- **JWT:** [python-jose](https://pypi.org/project/python-jose/)

### **Code Formatting and Styling**

- **black:** Ensures consistent code formatting.
- **isort:** Manages import statements.

### **Linting and Static Analysis**

- **flake8:** For PEP 8 compliance and linting.
- **mypy:** Static type checking.
- **pyright:** Advanced type checking for Python.
- **pylint:** Code analysis for error detection and enforcing coding standards.

### **Testing**

- **pytest:** Framework for writing and executing tests.