Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/CI-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:

- name: Run `cargo hack`
shell: bash
run: cargo hack check --each-feature --all-targets --package tartarus
run: cargo hack check --each-feature --all-targets --package hyperswitch_card_vault

test:
name: Run tests on stable toolchain
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

- name: Run `cargo hack`
shell: bash
run: cargo hack check --each-feature --all-targets --package tartarus
run: cargo hack check --each-feature --all-targets --package hyperswitch_card_vault

test:
name: Run tests on stable toolchain
Expand Down
108 changes: 54 additions & 54 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "tartarus"
name = "hyperswitch_card_vault"
version = "0.1.3"
edition = "2024"
default-run = "locker"
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Tartarus - Rust Locker
# Hyperswitch Card Vault - Rust Locker


## Overview

The Hyperswitch Card Vault (Tartarus) is a highly performant and a secure vault to save sensitive data such as payment card details, bank account details etc.
The Hyperswitch Card Vault is a highly performant and a secure vault to save sensitive data such as payment card details, bank account details etc.

It is designed in an polymorphic manner to handle and store any type of sensitive information making it highly scalable with extensive coverage of payment methods and processors.

Tartarus is built with a GDPR compliant personal identifiable information (PII) storage and secure encryption algorithms to be fully compliant with PCI DSS requirements.
Hyperswitch Card Vault is built with a GDPR compliant personal identifiable information (PII) storage and secure encryption algorithms to be fully compliant with PCI DSS requirements.

Here's a quick guide to [Get Started](./docs/guides/setup.md) with setting up Tartarus.
Here's a quick guide to [Get Started](./docs/guides/setup.md) with setting up Hyperswitch Card Vault.

### How does Tartarus work?
### How does Hyperswitch Card Vault work?

- Your application will communicate with Tartarus via a middleware.
- Your application will communicate with Hyperswitch Card Vault via a middleware.
- All requests and responses to and from the middleware are signed and encrypted with the JWS and JWE algorithms.
- The locker supports CRD APIs on the /data and /cards endpoints - <API Reference to be linked>
- Cards are stored against the combination of merchant and customer identifiers.
Expand All @@ -30,4 +30,4 @@ Here's a quick guide to [Get Started](./docs/guides/setup.md) with setting up Ta

### Setup Guide

Follow this guide to setup Tartarus - [Get Started](./docs/guides/setup.md)
Follow this guide to setup Hyperswitch Card Vault - [Get Started](./docs/guides/setup.md)
2 changes: 1 addition & 1 deletion benches/encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use rsa::{
RsaPrivateKey, RsaPublicKey,
pkcs8::{EncodePrivateKey, EncodePublicKey},
};
use tartarus::crypto::encryption_manager::{
use hyperswitch_card_vault::crypto::encryption_manager::{
encryption_interface::Encryption,
managers::{aes, jw},
};
Expand Down
2 changes: 1 addition & 1 deletion benches/hashing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#![allow(clippy::missing_panics_doc)]

use criterion::{Criterion, black_box, criterion_group, criterion_main};
use tartarus::crypto::hash_manager::{hash_interface::Encode, managers::sha::HmacSha512};
use hyperswitch_card_vault::crypto::hash_manager::{hash_interface::Encode, managers::sha::HmacSha512};

const ITERATION: u32 = 14;

Expand Down
2 changes: 1 addition & 1 deletion benches/luhn-test.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use criterion::{Criterion, black_box, criterion_group, criterion_main};
use tartarus::validations::{MAX_CARD_NUMBER_LENGTH, luhn};
use hyperswitch_card_vault::validations::{MAX_CARD_NUMBER_LENGTH, luhn};

#[allow(clippy::expect_used)]
fn card_number_generator() -> Vec<u8> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"info": {
"_postman_id": "c4ca9eca-2446-4011-bab0-dc0813ff737e",
"name": "Tartarus",
"name": "Hyperswitch Card Vault",
"description": "The is the API collection to test the card vault.\n\nIf you are newly deploying the card vault application, by using the docker images available here [juspaydotin/hyperswitch-card-vault](). You be required to unlock the locker using the key custodian API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "23503638"
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/testing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Prerequisites for Locker API Testing

A postman collection is included in `docs/collection/Tartarus.postman_collection.json` for testing the Locker API. The collection contains requests for all the endpoints of the Locker API.
A postman collection is included in `docs/collection/hyperswitch-card-vault.postman_collection.json` for testing the Locker API. The collection contains requests for all the endpoints of the Locker API.

Note: The requests in the Postman collection will not work when the `middleware` feature is enabled. This is because the requests need to be JWE (JSON Web Encryption) + JWS (JSON Web Signature) encrypted.

Expand Down
2 changes: 1 addition & 1 deletion docs/openapi-v2/spec.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: "3.0.2"
info:
title: Tartarus - OpenAPI 3.0
title: Hyperswitch Card Vault - OpenAPI 3.0
description: |-
This the the open API 3.0 specification for the card locker.
This is used by the [hyperswitch](https://github.com/juspay/hyperswitch) for storing card information securely.
Expand Down
4 changes: 2 additions & 2 deletions docs/openapi/spec.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: "3.0.2"
info:
title: Tartarus - OpenAPI 3.0
title: Hyperswitch Card Vault - OpenAPI 3.0
description: |-
This the the open API 3.0 specification for the card locker.
This is used by the [hyperswitch](https://github.com/juspay/hyperswitch) for storing card information securely.
Expand Down Expand Up @@ -283,7 +283,7 @@ components:
nick_name:
type: string
FingerprintCardData:
type: object
type: object
properties:
card_number:
type: string
Expand Down
10 changes: 5 additions & 5 deletions src/bin/locker.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use tartarus::{logger, tenant::GlobalAppState};
use hyperswitch_card_vault::{logger, tenant::GlobalAppState};

#[allow(clippy::expect_used)]
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut global_config =
tartarus::config::GlobalConfig::new().expect("Failed while parsing config");
hyperswitch_card_vault::config::GlobalConfig::new().expect("Failed while parsing config");

let _guard = logger::setup(
&global_config.log,
tartarus::service_name!(),
[tartarus::service_name!(), "tower_http"],
hyperswitch_card_vault::service_name!(),
[hyperswitch_card_vault::service_name!(), "tower_http"],
)
.expect("Failed to initialize logging");

Expand All @@ -23,7 +23,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {

let global_app_state = GlobalAppState::new(global_config).await;

tartarus::app::server_builder(global_app_state)
hyperswitch_card_vault::app::server_builder(global_app_state)
.await
.expect("Failed while building the server");

Expand Down
4 changes: 2 additions & 2 deletions src/bin/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

use std::io::{Read, Write, stdin, stdout};

use josekit::jwe;
use tartarus::{
use hyperswitch_card_vault::{
crypto::encryption_manager::{
encryption_interface::Encryption,
managers::{
Expand All @@ -17,6 +16,7 @@ use tartarus::{
},
error,
};
use josekit::jwe;

#[derive(argh::FromArgs, Debug)]
/// Utilities to generate associated properties used by locker
Expand Down
8 changes: 4 additions & 4 deletions src/crypto/hash_manager/managers/sha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ impl Encode<Vec<u8>, Vec<u8>> for Sha512 {
/// # Example
///
///```
/// use tartarus::crypto::hash_manager::managers::sha::HmacSha512;
/// use tartarus::crypto::hash_manager::hash_interface::Encode;
/// use hyperswitch_card_vault::crypto::hash_manager::managers::sha::HmacSha512;
/// use hyperswitch_card_vault::crypto::hash_manager::hash_interface::Encode;
///
/// let data = "Hello, World!";
/// let key = "key";
Expand All @@ -37,8 +37,8 @@ impl Encode<Vec<u8>, Vec<u8>> for Sha512 {
///
/// ```compile_fail
///
/// use tartarus::crypto::hash_manager::managers::sha::HmacSha512;
/// use tartarus::crypto::hash_manager::hash_interface::Encode;
/// use hyperswitch_card_vault::crypto::hash_manager::managers::sha::HmacSha512;
/// use hyperswitch_card_vault::crypto::hash_manager::hash_interface::Encode;
///
/// let key = "key";
/// let algo = HmacSha512::<0>::new(key.as_bytes().to_vec().into());
Expand Down
Loading