A newer version of the Gradio SDK is available:
5.41.1
title: KeyLock Auth System
emoji: π
colorFrom: pink
colorTo: yellow
sdk: gradio
sdk_version: 5.33.1
app_file: app.py
pinned: false
tag: mcp-server-track
π KeyLock Operations Dashboard
This is a self-contained demonstration of the complete KeyLock ecosystem, featuring the API Server, Image Creator, and an API Client simulator in a single, unified interface.
Important: Initial Setup Required
For the decryption functionality to work, you must provide the server's secret private key.
- Go to the Settings Tab: In this Space, navigate to the "Settings" page.
- Add a Repository Secret: Find the "Repository secrets" section and click "New secret".
- Enter the Secret:
- Name:
KEYLOCK_PRIV_KEY
- Value: Paste the entire private key string that corresponds to the public key stored in
keylock_pub.pem
.
- Name:
The Space will restart automatically. Once running, the "API Server Status" tab will confirm if the key was loaded successfully.
Dashboard Tabs
π‘ API Server Status & Docs
This tab shows the health of the conceptual "server". It confirms whether the private key is loaded and displays the public key that clients should use for encryption. It also provides documentation for the API endpoint that this server exposes for external clients.
π Image Creator
This is a tool to create encrypted PNG images.
- Enter your secret data in the textbox.
- Click "Create Encrypted Image".
- The application will use the server's public key (from
keylock_pub.pem
) to encrypt your data and embed it into a new image, which you can then download.
π» API Client (Simulator)
This tab acts as a client to test the server's decryption logic.
- Upload an image (ideally, one you just made in the "Image Creator" tab).
- Click "Decrypt Image".
- The application will perform a simulated API call by directly passing the image to the internal decryption function. The decrypted JSON data will be displayed. This demonstrates the end-to-end data flow without the need for an actual HTTP request.