
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
This is the Zitadel Ruby SDK, designed to provide a convenient and idiomatic way to interact with the Zitadel APIs in Ruby. The SDK provides a seamless wrapping of the Zitadel API, making it easy to authenticate service users and perform API operations.
The SDK enables efficient integration with the Zitadel API, allowing you to manage resources and execute actions. However, it's important to note that this SDK is tailored for service users and is not intended for user authentication scenarios. It does not support authentication mechanisms like OAuth2, OIDC, or SAML for client applications, including web, mobile, or other environments. For these types of user authentication, you should use other libraries that are designed for the specific platform and authentication method.
Disclaimer: This SDK is not suitable for implementing user authentication. It does not handle authentication for client applications using OAuth2, OIDC, or SAML and should not be used for scenarios requiring such functionality. For those use cases, consider using other solutions that are designed for user authentication across various platforms like web, mobile, or other client environments.
[!IMPORTANT] Please be aware that this SDK is currently in an incubating stage. We are releasing it to the community to gather feedback and learn how it is being used. While you are welcome to use it, please note that the API and functionality may evolve based on community input. We encourage you to try it out and share your experiences, but advise caution when considering it for production environments as future updates may introduce changes.
To use this SDK, you need a Zitadel account. Sign up at the official Zitadel website and obtain the necessary credentials to access the API.
Ensure you have Ruby 3 or higher installed.
Install the SDK by running one of the following commands:
gem install zitadel-client
If you're using Bundler use,
bundle add zitadel-client
Your SDK offers three ways to authenticate with Zitadel. Each method has its own benefits—choose the one that fits your situation best.
What is it? You use a JSON Web Token (JWT) that you sign with a private key stored in a JSON file. This process creates a secure token.
When should you use it?
How do you use it?
Example:
require 'zitadel-client'
require 'securerandom'
client = Zitadel::Client::Zitadel.with_private_key("https://example.us1.zitadel.cloud", "path/to/jwt-key.json")
begin
response = client.users.add_human_user(
Zitadel::Client::UserServiceAddHumanUserRequest.new(
username: SecureRandom.hex,
profile: Zitadel::Client::UserServiceSetHumanProfile.new(
given_name: 'John',
family_name: 'Doe'
),
email: Zitadel::Client::UserServiceSetHumanEmail.new(
email: "john.doe@example.com"
)
)
)
puts "User created: #{response}"
rescue StandardError => e
puts "Error: #{e.message}"
end
What is it? This method uses a client ID and client secret to get a secure access token, which is then used to authenticate.
When should you use it?
How do you use it?
Example:
require 'zitadel-client'
require 'securerandom'
client = Zitadel::Client::Zitadel.with_client_credentials("https://example.us1.zitadel.cloud", "id", "secret")
begin
response = client.users.add_human_user(
Zitadel::Client::UserServiceAddHumanUserRequest.new(
username: SecureRandom.hex,
profile: Zitadel::Client::UserServiceSetHumanProfile.new(
given_name: 'John',
family_name: 'Doe'
),
email: Zitadel::Client::UserServiceSetHumanEmail.new(
email: "john.doe@example.com"
)
)
)
puts "User created: #{response}"
rescue StandardError => e
puts "Error: #{e.message}"
end
What is it? A Personal Access Token (PAT) is a pre-generated token that you can use to authenticate without exchanging credentials every time.
When should you use it?
How do you use it?
Example:
require 'zitadel-client'
require 'securerandom'
client = Zitadel::Client::Zitadel.with_access_token("https://example.us1.zitadel.cloud", "token")
begin
response = client.users.add_human_user(
Zitadel::Client::UserServiceAddHumanUserRequest.new(
username: SecureRandom.hex,
profile: Zitadel::Client::UserServiceSetHumanProfile.new(
given_name: 'John',
family_name: 'Doe'
),
email: Zitadel::Client::UserServiceSetHumanEmail.new(
email: "john.doe@example.com"
)
)
)
puts "User created: #{response}"
rescue StandardError => e
puts "Error: #{e.message}"
end
Choose the authentication method that best suits your needs based on your environment and security requirements. For more details, please refer to the Zitadel documentation on authenticating service users.
The SDK supports debug logging, which can be enabled for troubleshooting
and debugging purposes. You can enable debug logging by setting the debug
flag to true
when initializing the Zitadel
client, like this:
zitadel = zitadel.Zitadel("your-zitadel-base-url", 'your-valid-token', lambda config: config.debug = True)
When enabled, the SDK will log additional information, such as HTTP request and response details, which can be useful for identifying issues in the integration or troubleshooting unexpected behavior.
This SDK is designed to be lean and efficient, focusing on providing a streamlined way to interact with the Zitadel API. It relies on the commonly used urllib3 HTTP transport for making requests, which ensures that the SDK integrates well with other libraries and provides flexibility in terms of request handling and error management.
A key aspect of our strategy is that the SDK's major version is synchronized with the ZITADEL core project's major version to ensure compatibility. For a detailed explanation of this policy and our release schedule, please see our Versioning Guide.
This repository is autogenerated. We do not accept direct contributions. Instead, please open an issue for any bugs or feature requests.
If you encounter any issues or have suggestions for improvements, please open an issue in the issue tracker. When reporting an issue, please provide the following information to help us address it more effectively:
If you need help setting up or configuring the SDK (or anything Zitadel), please head over to the Zitadel Community on Discord.
There are many helpful people in our Discord community who are ready to assist you.
Cloud and enterprise customers can additionally reach us privately via our support communication channels.
This SDK is distributed under the Apache 2.0 License.
FAQs
Unknown package
We found that zitadel-client 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.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.