{"_id":"@akeyless-community/netlify-runtime","name":"@akeyless-community/netlify-runtime","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@akeyless-community/netlify-runtime","version":"0.1.0","description":"Fetch Akeyless secrets at runtime on Netlify (Node.js) — no env-var sync required","license":"Apache-2.0","author":{"name":"Akeyless Community"},"repository":{"type":"git","url":"git+https://github.com/akeyless-community/netlify-akeyless-runtime.git"},"homepage":"https://github.com/akeyless-community/netlify-akeyless-runtime#readme","keywords":["akeyless","netlify","secrets","runtime","serverless","functions"],"engines":{"node":">=18"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.json","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","prepublishOnly":"npm run build"},"publishConfig":{"access":"public"},"dependencies":{"akeyless":"^5.0.25","akeyless-cloud-id":"^1.0.0"},"devDependencies":{"@types/jest":"^29.5.14","@types/node":"^20.17.0","jest":"^29.7.0","ts-jest":"^29.2.5","typescript":"^5.7.2"},"_id":"@akeyless-community/netlify-runtime@0.1.0","bugs":{"url":"https://github.com/akeyless-community/netlify-akeyless-runtime/issues"},"_nodeVersion":"26.3.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-A4Z6itxmJHp6qmkserzSBDTlQ21DF4CyN8lNX6Ij06+lxGM8rHBzHVQt0YLC8qArCcGYvoK0T6ARpAC6AUilQg==","shasum":"702ab914dfc19b14b3fb8e5bb33c100df7e4bcb2","tarball":"https://registry.npmjs.org/@akeyless-community/netlify-runtime/-/netlify-runtime-0.1.0.tgz","fileCount":31,"unpackedSize":68676,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGsBCsolALoCB3RA6G65TqVPWBo9mIsEte3g3OnGrBsoAiB/dvFxEH1dl6QiScKhQN+LnBAvt8Psumb+Kc19ETmGBQ=="}]},"_npmUser":{"name":"barak-akeyless","email":"barak.a@akeyless.io"},"directories":{},"maintainers":[{"name":"barak-akeyless","email":"barak.a@akeyless.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/netlify-runtime_0.1.0_1781505087247_0.43912869185228276"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-15T06:31:27.056Z","0.1.0":"2026-06-15T06:31:27.400Z","modified":"2026-06-15T06:31:27.641Z"},"maintainers":[{"name":"barak-akeyless","email":"barak.a@akeyless.io"}],"description":"Fetch Akeyless secrets at runtime on Netlify (Node.js) — no env-var sync required","homepage":"https://github.com/akeyless-community/netlify-akeyless-runtime#readme","keywords":["akeyless","netlify","secrets","runtime","serverless","functions"],"repository":{"type":"git","url":"git+https://github.com/akeyless-community/netlify-akeyless-runtime.git"},"author":{"name":"Akeyless Community"},"bugs":{"url":"https://github.com/akeyless-community/netlify-akeyless-runtime/issues"},"license":"Apache-2.0","readme":"# @akeyless-community/netlify-runtime\n\nFetch [Akeyless](https://www.akeyless.io) secrets at **runtime** on [Netlify](https://www.netlify.com) (Node.js). No sync to Netlify environment variables — Akeyless stays the source of truth.\n\nWorks standalone or with the [Akeyless Netlify integration](../netlify-akeyless-integration).\n\n## Install\n\n```bash\nnpm install @akeyless-community/netlify-runtime\n```\n\nRequires **Node.js 18+** and **Netlify Functions** (not Edge Functions).\n\n## Quick start\n\n### 1. Bootstrap env vars in Netlify\n\nSet only auth + path prefix (not application secrets):\n\n| Variable | Required | Example |\n|----------|----------|---------|\n| `AKEYLESS_ACCESS_ID` | Yes* | `p-xxxxx` |\n| `AKEYLESS_ACCESS_KEY` | Yes* | access key secret |\n| `AKEYLESS_SECRET_PREFIX` | Recommended | `/netlify/my-site/production` |\n| `AKEYLESS_GATEWAY_URL` | No | `https://api.akeyless.io` |\n\n\\* Or use another [auth method](#authentication) below.\n\nOrganize secrets in Akeyless:\n\n```\n/netlify/my-site/production/DATABASE_URL\n/netlify/my-site/production/STRIPE_SECRET_KEY\n```\n\n### 2. Fetch in a Netlify Function\n\n```typescript\n// netlify/functions/checkout.ts\nimport type { Handler } from '@netlify/functions';\nimport { getSecret } from '@akeyless-community/netlify-runtime';\n\nexport const handler: Handler = async () => {\n  const stripeKey = await getSecret('STRIPE_SECRET_KEY');\n  return {\n    statusCode: 200,\n    body: JSON.stringify({ ok: true, hasStripe: Boolean(stripeKey) }),\n  };\n};\n```\n\nUse `getSecret` only in **server** code (Functions, server-side rendering). Never import in client bundles.\n\n### 3. Per-deploy-context prefix\n\nSet `AKEYLESS_SECRET_PREFIX` per deploy context in the Netlify UI, or let the library derive it from Netlify metadata:\n\n```\n/netlify/{SITE_NAME}/{CONTEXT}\n```\n\n| Netlify `CONTEXT` | Typical prefix |\n|-------------------|----------------|\n| `production` | `/netlify/my-site/production` |\n| `deploy-preview` | `/netlify/my-site/deploy-preview` |\n| `branch-deploy` | `/netlify/my-site/branch-deploy` |\n| `dev` | `/netlify/my-site/dev` |\n\n## API\n\n### Convenience (singleton, warm-invocation friendly)\n\n```typescript\nimport { getSecret } from '@akeyless-community/netlify-runtime';\n\nconst dbUrl = await getSecret('DATABASE_URL');\n```\n\n### Explicit client\n\n```typescript\nimport { createClient } from '@akeyless-community/netlify-runtime';\n\nconst client = createClient({\n  gatewayUrl: 'https://api.akeyless.io',\n  secretPrefix: '/netlify/my-site/production',\n  accessId: process.env.AKEYLESS_ACCESS_ID!,\n  accessKey: process.env.AKEYLESS_ACCESS_KEY!,\n});\n\nawait client.getSecret('DATABASE_URL');\nawait client.getSecretAtPath('/custom/full/path');\nawait client.getDynamicSecret('db-creds');\nawait client.getRotatedSecret('rotated-api-key');\n```\n\n## Authentication\n\n| Method | `AKEYLESS_ACCESS_TYPE` | Additional env |\n|--------|------------------------|----------------|\n| Access key (default) | `access_key` | `AKEYLESS_ACCESS_ID`, `AKEYLESS_ACCESS_KEY` |\n| API key | `api_key` | `AKEYLESS_ACCESS_ID`, `AKEYLESS_ACCESS_KEY` |\n| Universal Identity | `universal_identity` | `AKEYLESS_UID_TOKEN` |\n| JWT | `jwt` | `AKEYLESS_ACCESS_ID`, `AKEYLESS_JWT` |\n| AWS IAM | `aws_iam` | `AKEYLESS_ACCESS_ID`, optional `AKEYLESS_CLOUD_ID` |\n| Azure AD | `azure_ad` | `AKEYLESS_ACCESS_ID`, optional `AKEYLESS_CLOUD_ID` |\n| GCP | `gcp` | `AKEYLESS_ACCESS_ID`, optional `AKEYLESS_CLOUD_ID` |\n| Pre-authenticated | — | `AKEYLESS_TOKEN` |\n\nUse a dedicated Akeyless auth method with **read-only** access to your `/netlify/...` path.\n\n## Caching\n\n- **Auth tokens** refresh before expiry (default margin: 1 minute).\n- **Secret values** cache in memory for **5 minutes** by default (`AKEYLESS_SECRET_CACHE_TTL_MS`).\n- Warm function invocations reuse the same module singleton.\n\n## Local development\n\n```bash\nexport AKEYLESS_ACCESS_ID=p-xxxxx\nexport AKEYLESS_ACCESS_KEY=your-key\nexport AKEYLESS_SECRET_PREFIX=/netlify/my-site/dev\nnetlify dev\n```\n\n## Limitations\n\n- **Node.js Functions only** — the `akeyless` SDK does not run on Netlify Edge Functions.\n- **Network** — functions must reach your Akeyless gateway (`api.akeyless.io` or self-hosted).\n- **Build-time secrets** — for build-time injection, use the [Akeyless Netlify integration](../netlify-akeyless-integration) push-sync mode.\n\n## Related community projects\n\n- [netlify-akeyless-integration](../netlify-akeyless-integration) — Netlify SDK integration for secret sync\n- [vercel-akeyless-runtime](../vercel-akeyless-runtime) — Vercel runtime pull\n- [heroku-akeyless-runtime](../heroku-akeyless-runtime) — Heroku runtime pull\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md","_rev":"1-46486c94102a7ffe71a4b4b095972eed"}