Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gitlab-cloud-connector

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitlab-cloud-connector

  • 0.2.5
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

gitlab-cloud-connector (Ruby)

Ruby gem containing shared code for Cloud Connector token issuers (GitLab, CustomersDot).

Usage

We expect Bundler is used to manage dependencies. To add the dependency, add it to Gemfile:

gem "gitlab-cloud-connector", "~> 0.1.1", require: 'cloud_connector'

Usage

Data Storage

Cloud Connector uses YAML files stored in the project's /config directory. The data is organized by model type:

# config/backend_services/ai_gateway.yml
name: ai_gateway
description: "AI Gateway"
jwt_aud: gitlab-ai-gateway

# config/add_ons/duo_pro.yml
name: duo_pro
description: "Duo Pro"

# config/unit_primitives/duo_chat.yml
name: duo_chat
description: "Duo Chat"
backend_services:
  - ai_gateway
add_ons:
  - duo_pro
  - duo_enterprise

Working with DataModels

DataModels are the core data structures in the Cloud Connector. Each model inherits from DataModel::Base. The data is loaded from YAML files into memory at runtime, making it efficient for read operations and relationship traversal.

require 'cloud_connector'

# Find unit primitive by name
# Note:  value should be a symbol (e.g., `:duo_chat` instead of `'duo_chat'`).
duo_chat = Gitlab::CloudConnector::DataModels::UnitPrimitive.find_by_name(:duo_chat)
duo_chat.description
duo_chat.cut_off_date

# access associations
duo_chat.add_ons
duo_chat.license_types
duo_chat.backend_services

# read duo_chat audiences
duo_chat.backend_services.map(&:jwt_aud)

Release Process

See Release Process

Once the new gem version is visible on RubyGems.org, it is recommended to update GitLab's Gemfile and Customers Dot's Gemfile to bump the gitlab-cloud-connector Ruby gem to the new version also. See Usage for how to do this.

FAQs

Package last updated on 11 Dec 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc