Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
camunda-saas-oauth
Advanced tools
Changelog
1.2.4
Things that were broken and are now fixed.
Readme
A library to exchange a set of Camunda 8 SaaS API credentials for a token to make API calls to Camunda 8 SaaS. Uses camunda-8-credentials-from-env to get the credentials from the environment.
Caches the token to disk, and refreshes tokens before they expire.
Install as a dependency:
npm i camunda-saas-oauth
import * as auth from "camunda-saas-oauth"
async function main () {
const useragent = 'myclient-nodejs/1.0.0'
const operateToken = await auth.getOperateToken(useragent)
const tasklistToken = await auth.getTasklistToken(useragent)
const optimizeToken = await auth.getOptimizeToken(useragent)
const zeebeToken = await auth.getZeebeToken(useragent)
return {
operateToken,
tasklistToken,
optimizeToken,
zeebeToken
}
}
The call will throw if the client credentials are not found in the environment, or you request a token for a scope for which the credentials are not valid.
Set the API client credentials in the environment, using the environment variables from the web console.
To configure a different cache directory, set the CAMUNDA_TOKEN_CACHE_DIR
environment variable.
To turn off disk caching, set the environment variable CAMUNDA_TOKEN_CACHE=memory-only
.
Example of a custom user agent string: mycustom-client-nodejs/${pkg.version} ${CUSTOM_AGENT_STRING}
The methods that return tokens use an OAuthProvider
to get the tokens.
The OAuthProvider
class is a wrapper that hydrates a OAuthProviderImpl
with credentials from the environment.
If you want to manually set the credentials (for example, to address multiple clusters in a single application), you can do so by creating an OAuthProviderImpl
directly, like so:
import { OAuthProviderImpl } from 'camunda-saas-oauth'
const oauth = new OAuthProviderImpl({
/** OAuth Endpoint URL */
authServerUrl,
/** OAuth Audience */
audience, clientId, clientSecret,
userAgentString
})
const operateToken = oauth.getToken('OPERATE')
const optimizeToken = oauth.getToken('OPTIMIZE')
const tasklistToken = oauth.getToken('TASKLIST')
const zeebeToken = oauth.getToken('ZEEBE')
FAQs
A library to exchange a set of Camunda 8 SaaS API credentials for a token
We found that camunda-saas-oauth demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.