@forgerock/fr-config-manager

中文文档
1.9.0发布于 2026/09/09MIT近 30 天下载 5392

Sample tools for managing PingOne Advanced Identity Cloud configuration

原始使用文档
文档目录23 节
  1. Disclaimer
  2. Introduction
  3. Packages
  4. Prerequisites
  5. Installation
  6. Installing from source
  7. Installing via npm
  8. Configuration
  9. Oauth2 agent configuration file
  10. Authorization policy config file
  11. Service objects config file
  12. CSP overrides file
  13. Raw config file
  14. SAML entity configuration file
  15. Exported configuration
  16. Managing ESVs
  17. Quickstart
  18. Install
  19. Create a base directory and configuration file
  20. Configure
  21. Create a blank github repo
  22. Pull config and commit
  23. Licence

PingOne Advanced Identity Cloud - Sample Configuration Management Tools

Disclaimer

The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. ForgeRock does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in production configurations. ForgeRock does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or completeness of any data or information relating to the sample code. ForgeRock disclaims all warranties, expressed or implied, and in particular, disclaims all warranties of merchantability, and warranties related to the code, or any service or software related thereto.

ForgeRock shall not be liable for any direct, indirect or consequential damages or costs of any type arising out of any action taken by you or others related to the sample code.

Introduction

This repository includes sample javascript based tools for managing Identity Cloud configuration in an external repository. The scripts are a starting point for customers who wish to store and manage Identity Cloud configuration in their own repository and automate the export and/or import of this configuration via a CI/CD pipeline or other management framework.

In order to meet the requirements of managing ForgeRock config as code, the tools provide a view of configuration which is:

  • Complete - a complete representation of all configuration of a tenant
  • Understandable - all configuration should be as legible and understandable as possible.
  • Modular - monolithic configuration is broken into its constituent parts for more granular management
  • Predictable - order and format of configuration does not change if no changes are made.

Note that these tools are not supported by ForgeRock: they are sample code to be adapted or used as-is as part of the customer owned configuration management tooling.

If you encounter any issues or have any suggestions for improvement, please raise an issue via the repo and it will be reviewed for addition to the backlog.

If you would like to contribute to this project you can fork the repository, clone it to your machine and get started.

Packages

This repository provides the following packages

  • fr-config-pull - A tool to pull configuration from Identity Cloud into a local repository
  • fr-config-push - A tool to push configuration from a local repository into Identity Cloud
  • fr-config-promote - A tool to promote configuration from a lower tenant to a upper tenant in Identity Cloud
  • fr-config-delete - A tool to delete configuration from an Identity Cloud tenant (beta)

For full usage details, refer to the README in the respective package directories.

Prerequisites

The tools require the following:

  • Node.js
  • Access to a PingOne Advanced Identity Cloud tenant.
  • A tenant service account ID and private key.

Refer to the Identity Cloud documentation for details on how to create a service account and obtain its ID and private key.

Installation

The fr-config-manager packages may be installed from source or as an npm package.

Installing from source

To install all packages from source, clone the config manager repository, checkout the latest version and build the tools

mkdir ~/identity-cloud
cd ~/identity-cloud
git clone https://github.com/ForgeRock/fr-config-manager
cd fr-config-manager
git checkout `git describe --abbrev=0`
npm clean-install
npm link

Installing via npm

To install all packages using npm

npm i -g @forgerock/fr-config-manager

This will install

  • fr-config-pull
  • fr-config-push
  • fr-config-promote
  • fr-config-delete

Configuration

The tools are configured via the environment, either using a .env file in the working directory, or via corresponding environment variables. The .env.sample file in the root of this repository provides an example, and should be copied as .env to the working directory when running the tool (or used as a reference for setting environment variables).

Refer to the configuration README for more details.

The .env file includes references to additional (optional) configuration files for managing various types of dynamic configuration - i.e. configuration which differs per inidividual environment (as opposed to static configuration which is promoted as-is to all environments). Generally speaking, these configuration files inform the fr-config-pull tool which entities to pull, and how to templatise their config with placeholders so that the fr-config-push tool can create these entities in each environment. As part of the push, the placeholders are subsituted with corresponding environment variables in the fr-config-push working environment.

Oauth2 agent configuration file

The OAuth2 agent configuration file contains a list of agents to pull from the Identity Cloud tenant, for subsequent push to each target environment.

The path to this file is configured in the .env file (or environment directly) as the OAUTH2_AGENTS_CONFIG value.

Refer to the agent configuration README for more details.

Authorization policy config file

The OAuth2 agent configuration file contains a list of policy sets to pull from the Identity Cloud tenant, for subsequent push to each target environment.

The path to this file is configured in the .env file (or environment directly) as the AUTHZ_POLICY_SETS_CONFIG value.

Refer to the policy configuration README for more details.

Service objects config file

The service objects configuration file contains a list of managed objects to pull from the Identity Cloud tenant, for subsequent push to each target environment.

The path to this file is configured in the .env file (or environment directly) as the SERVICE_OBJECTS_CONFIG value.

Refer to the configuration README for more details.

CSP overrides file

The Content Security Policy configuration file contains a JSON encoded partial CSP configuration which is merged with the full tenant configuration on pull. This enables the use of local environment variables to create a different CSP to be pushed to each environment - e.g. report-only in dev, but enforced in higher environments.

The path to this file is configured in the .env file (or environment directly) as the CSP_OVERRIDES value.

Refer to the configuration README for more details.

Raw config file

The raw configuration file contains a list of individual configuration paths to pull, and is intended for pulling arbitrary configuration which is not covered by existing commands. The path to this file is configured in the .env file (or environment directly) as the RAW_CONFIG value.

Refer to the raw config README for more details.

SAML entity configuration file

The SAML entity configuration file contains a list of SAML entities to pull from the Identity Cloud tenant, for subsequent push to each target environment.

The path to this file is configured in the .env file (or environment directly) as the SAML_CONFIG value.

Refer to the SAML configuration README for more details.

Exported configuration

The fr-config-pull tool exports ForgeRock configuration to the local filesystem as a set of json files in a directory structure that represents both global and realm specific configuration.

The fr-config-push tool imports ForgeRock configuration from the local filesystem to the PingOne Advanced Identity Cloud tenant: the tool expects configuration to be structured as per the fr-config-pull output.

Refer to the export contents README for more details of the configuration structure.

Managing ESVs

Environment specific variables and secrets may be pushed via the fr-config-push variables and fr-config-push secrets option. The typical approach is to build a local configuration file for each ESV, with a placeholder for the value. The configuration file may be built automatically using the fr-config-pull command. On push, the value is then substituted with a local environment variable - e.g. a github secret. Refer to the ESV README for more details.

Quickstart

To get started, create a baseline repo with your initial Identity Cloud configuration as a baseline, with the following steps

  • Install the fr-config-manager packages
  • Create a base directory
  • Configure the tools via an .env file
  • Create an empty configuration repository
  • Use fr-config-pull to populate the repository with the current tenant configuration

Install

npm i -g @forgerock/fr-config-manager

Create a base directory and configuration file

mkdir ~/identity-cloud
cd ~/identity-cloud
curl https://raw.githubusercontent.com/ForgeRock/fr-config-manager/main/.env.sample -o .env

Configure

Edit the basic configuration section of the .env file, as per the configuration README. For the CONFIG_DIR option, use the default relative path in the .env file:

CONFIG_DIR=identity-cloud-config

Configure the remaining basic settings:

  • TENANT_BASE_URL
  • SCRIPT_PREFIXES
  • SERVICE_ACCOUNT_ID
  • SERVICE_ACCOUNT_KEY

Create a blank github repo

Create a directory corresponding to CONFIG_DIR in the .env file, and initialise as a repo

cd ~/identity-cloud
mkdir identity-cloud-config
cd identity-cloud-config
git init

Pull config and commit

cd ~/identity-cloud/identity-cloud-config
git checkout -b initial-config
cd ~/identity-cloud
fr-config-pull all-static
cd ~/identity-cloud/identity-cloud-config
git add .
git commit -m "Initial config"

Licence

This project is licensed under the MIT License - see the LICENSE file for details

版本与发布记录

@forgerock/fr-config-manager 共发布 15 个版本,首次发布于 2024/07/24;过去 12 个月发布了 6 个版本。

版本发布日期距今
1.9.0latest2026/09/092 个月前
1.8.32026/08/172 个月前
1.8.02026/07/144 个月前
1.5.122026/03/277 个月前
1.5.112026/03/168 个月前
1.5.82026/01/0710 个月前

关于 @forgerock/fr-config-manager 的常见问题

@forgerock/fr-config-manager 是什么?

Sample tools for managing PingOne Advanced Identity Cloud configuration

如何安装 @forgerock/fr-config-manager?

在项目目录运行 npm install @forgerock/fr-config-manager,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 fr-config-pull、fr-config-push、fr-config-promote、fr-config-delete,可以用 npx fr-config-pull 直接运行。

@forgerock/fr-config-manager 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/forgerock__fr-config-manager 是否存在。

@forgerock/fr-config-manager 可以商用吗?

@forgerock/fr-config-manager 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@forgerock/fr-config-manager 的下载量有多少?

根据 npm 官方下载统计,@forgerock/fr-config-manager 在 2026/10/16 – 2026/11/14 这 30 天内被下载 5,392 次,日均约 180 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@forgerock/fr-config-manager 还在维护吗?

最新版本 1.9.0 发布于 2026/09/09(2 个月前);至今共发布 15 个版本,其中过去 12 个月发布了 6 个;首次发布于 2024/07/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。