在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):apigee/apigee-config-maven-plugin开源软件地址(OpenSource Url):https://github.com/apigee/apigee-config-maven-plugin开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):apigee-config-maven-pluginMaven plugin to create, manage Apigee config like Cache, KVM, Target Server, Resource Files, API Products, Developers, Developer Apps, Flow hooks, Extensions, Mask Config, Custom Roles and API Spec.
Help API teams follow API development best practices with Apigee.
Small API projects can use the single file format in edge.json to manage their config. Large, complex projects with several config entities can use the multi-file format to organize config in source control. Checkout samples for examples. This plugin is available in public maven repo and can be used just by referring to it in pom.xml. This github repo is the plugin source code and unless you make changes to the code you do not have to build this repo to use the plugin. Read this document further for plugin usage instructions. NOTE: Log4J libraries are upgraded to v2.17.1 in v1.5.2 PrerequisitesYou will need the following to run the samples:
Plugin UsageNOTE
<dependency>
<groupId>com.apigee.edge.config</groupId>
<artifactId>apigee-config-maven-plugin</artifactId>
<version>2.x</version>
</dependency>
<dependency>
<groupId>com.apigee.edge.config</groupId>
<artifactId>apigee-config-maven-plugin</artifactId>
<version>1.x</version>
</dependency>
The default "none" action is a NO-OP and it helps deploy APIs (using apigee-deploy-maven-plugin) without affecting config. To configure a proxySupported from v1.4 Please refer to this doc that explains how to setup proxy settings in your settings.xml usually in your $HOME/.m2 directory. Only Sample projectRefer to an example project at /samples/EdgeConfig This project demonstrates the creation and management of Apigee Edge Config and performs the following steps in sequence.
To use, edit samples/EdgeConfig/shared-pom.xml, and update org and env elements in all profiles to point to your Apigee org, env. You can add more profiles corresponding to each env in your org.
To run the plugin and use edge.json jump to samples project
To run the plugin and use a config file similar to edge.json in any directory jump to samples project
To run the plugin and use the multi-file config format jump to samples project
Refer to samples/APIandConfig/HelloWorld for config management along with API deployment using apigee-deploy-maven-plugin. More info at samples/README.md Multi-file configProjects with several config entities can utilize the multi-file structure to organize config while keeping individual file sizes within manageable limits. The plugin requires the use of specific file names and directories to organize config. The apigee.config.dir option must be used to identify the top most directory containing the following config structure.
From v1.5.3, the plugin supports multi-file config with prefixesYou can split files into multiple files with a prefix. For example see below
Single file config structure - edge.jsonProjects with fewer config entities can use the single file edge.json format to capture all config of an API project. The edge.json file organizes config into 3 scopes corresponding to the scopes of config entities that can be created in Edge. The plugin looks for edge.json in the current directory by default.
For example, API product is an orgConfig whereas Cache is an envConfig. The envConfig is further organized into individual environments as follows.
The environment name is intended to be the same as the profile name in pom.xml (parent-pom.xml or shared-pom.xml). The final level is the config entities.
Each config entity is the payload of the corresponding management API. The example project may not show all the attributes of config entities, but any valid input of a management API would work. Config entities like "developerApps" are grouped under the developerId (email) they belong to. OAuth (supported from v1.2 or higher)Apigee management APIs are secured using OAuth tokens as an alternative to the Basic Auth security. Additionally Two-Factor authentication (MFA) using TOTP can also be configured as an additional layer of security. This plugin has the capability to acquire OAuth tokens and invoke management API calls. Refer to How to get OAuth2 tokens and Two-Factor authenticationfor details. Using OAuthOAuth capability when enabled is seamless and the plugin acquires OAuth tokens and uses it subsequently to call management APIs. To enable OAuth add the following options to all profiles as required. Refer to shared-pom.xml example.
You need to pass the OAuth ClientId and Secret to the plugin for it to generate the token and use that to invoke the Apigee Management APIs
To invoke, add command line flags to enable OAuth.
"tokenurl" is optional and defaults to the cloud version "https://login.apigee.com/oauth/token" Two-Factor AuthenticationTwo-Factor authentication is based on TOTP tokens. When the apigee account is enabled for Two-Factor Authentication it applies to management APIs as well. The plugin can accept TOTP tokens generated by an external utility and use it to acquire OAuth tokens. TOTP can be generated using command line tools for use in CI tools like Jenkins. Using Two-Factor Authentication tokenNote OAuth needs to be enabled before Two-Factor Authentication can be used. To enable Two-Factor Authentication, add the following options to all profiles as required. Refer to shared-pom.xml example.
Provide the token when invoking the plugin.
If the API takes a long time to package up then it is likely that the token would have expired before it is used. To mitigate against this, from version 1.1.5, an initmfa goal can be called during the validate phase:
Depending on where the plugin is in the order, and how much validation is required, it is possible that this may still result in token timeout. Passing the Bearer Token as a parameterIf you would like to generate the bearer token outside of this plugin and provide it as a command line parameter, you can add the following:
Provide the token when invoking the plugin.
NOTE: when using bearer token - please provide the username as well, as it is used for token validation Passing the Refresh Token as a parameterIf you would like to generate the refresh token outside of this plugin and provide it as a command line parameter, you can add the following:
Provide the token when invoking the plugin.
NOTE: If you are providing refresh token, you need to provide the bearer token and username as well Apigee edge comes with several inbuilt role that provides several permission level Update Developer App and Company App (from v1.4.5 onwards)When ROADMAP
Please send feature requests using issues SupportIssues filed on Github are not subject to service level agreements (SLAs) and responses should be assumed to be on an ad-hoc volunteer basis. The Apigee community board is recommended as for community support and is regularly checked by Apigee experts. Apigee customers should use formal support channels for Apigee product related concerns.
DisclaimerThis is not an officially supported Google product. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论