Skip to main content

Tradekartauth

TradeKart authentication package for private tools.

System Design

TradeKart Auth System Design

Your service calls one object, TradeKartAuth. It hands the token to TokenVerifier, which checks it against Cognito's public keys. Once the token's confirmed real, rbac.py reads the token's group and answers "which role is this?" and "can this role do X?". ssm_config.py is optional — only used at startup if you'd rather load the pool id/region from AWS SSM instead of hardcoding them.

CDK pipeline: if a stage fails

cdk deploy only creates CodePipeline; failures after that happen inside AWS (Synth, UpdatePipeline, or Publish).

  1. Open CodePipelineTradekartAuthPipeline → click the failed execution → open the failed stage (red).
  2. Open Details / View in CodeBuild and read the log tail (the last error line is what matters).
Stage Typical causes
Source Bitbucket connection not Available; wrong repo / branch; repo missing infra/package-lock.json.
Build (Synth) npm ci / tsc must run inside infra/ — the pipeline uses cd infra && … in one shell. Ensure infra/package-lock.json is committed.
UpdatePipeline CDK bootstrap / IAM for self-mutation; upgrade CDK bootstrap if prompted.
Publish PyPI token wrong or secret is JSON not raw token; bump version in version.py if twine says file already exists; KMS permission if secret uses a CMK.

Secret format: TWINE_PASSWORD must be the raw PyPI token (pypi-Ag...). If you stored JSON in Secrets Manager, either switch to plaintext or adjust the pipeline to parse JSON.

After changing infra/lib/pipeline-stack.ts, run cd infra && npm run build && npx cdk deploy ... again to update the pipeline.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tradekartauth-0.2.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tradekartauth-0.2.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file tradekartauth-0.2.0.tar.gz.

File metadata

  • Download URL: tradekartauth-0.2.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for tradekartauth-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5bb23bafa56ba4f7a80e59759de10eac24767df3c64658e0eb209de5f271e822
MD5 7a7d61e6a2fb1ccaf07a34481c823ff6
BLAKE2b-256 2fe4ca5faf7d91673409994c4b8a06c1eaa7736a351f098b5162c1a71d48f2d6

See more details on using hashes here.

File details

Details for the file tradekartauth-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tradekartauth-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for tradekartauth-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7b5a9df1d18acfe72c0a0e7ddff3c16250fcc857986b0b7a2a1423698466d0a
MD5 b994b4bb52c20a51d5e384dd95d566c0
BLAKE2b-256 84b30198dc9f6e03ae38a4fbd3033ec607ae43c7cdae2b6b745f65744a65efe1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page