| Crates.io | timely-pass-sdk |
| lib.rs | timely-pass-sdk |
| version | 0.1.0 |
| created_at | 2026-01-24 11:47:20.524105+00 |
| updated_at | 2026-01-24 11:47:20.524105+00 |
| description | A secure, time-based password policy manager SDK. |
| homepage | |
| repository | https://github.com/afsall-labs/timely-pass |
| max_upload_size | |
| id | 2066557 |
| size | 51,498 |
Timely Pass is a production-grade, composable, and modular Rust SDK and CLI tool for managing local, time-based password policies. It allows users and applications to define sophisticated rules for when credentials are valid, enforcing security constraints based on absolute time (dates) and relative time (durations).
Built with a "Security First" mindset, Timely Pass ensures strict cryptographic protection, secure memory handling, and auditability.
OnlyBefore: Valid only before a specific date.OnlyAfter: Valid only after a specific date.OnlyWithin: Valid within a specific time range.OnlyFor: Valid for a specific duration from creation or last use.Secret types.zeroize crate.timely-pass-sdk) for embedding in applications.timely-pass-cli) for human interaction.Ensure you have Rust and Cargo installed.
# Install from source
git clone https://github.com/yourusername/timely-pass.git
cd timely-pass
cargo install --path timely-pass-cli
Verify the installation:
timely-pass --help
Create a new encrypted store. You will be prompted to set a strong passphrase.
timely-pass init
# Default store is created at ./store.timely
Add a password or API key. If you don't provide a secret, one will be securely generated for you.
# Add a generated key
timely-pass add --id api-key-prod --type key
# Add a specific password
timely-pass add --id email-password --type password --secret
Retrieve and decrypt a credential. This updates its usage counter and "last used" timestamp.
timely-pass get --id api-key-prod
Create a policy file (e.g., policy.toml) to restrict access to business hours or a specific timeframe. You can also manage policies directly in the store using timely-pass policy add.
policy.toml:
id = "business-hours"
version = 1
clock_skew_secs = 60
single_use = false
[[hooks]]
type = "OnlyWithin"
[hooks.period]
type = "Range"
start = "2024-01-01T09:00:00Z"
end = "2025-01-01T17:00:00Z"
Add a credential with this policy:
timely-pass add --id restricted-token --type token --policy policy.toml
Check if a policy would allow access at a specific time (dry-run).
timely-pass eval --policy policy.toml --time "2024-06-01T12:00:00Z"
Detailed documentation is available in the docs/ directory:
timely-pass-sdk in your Rust projects.Timely Pass uses industry-standard cryptographic primitives:
chacha20poly1305 crate).argon2 crate).See Security Model for details.
This project is licensed under the MIT License - see the LICENSE file for details.