Giter Club home page Giter Club logo

osgi-service-json-config's Introduction

osgi-service-config

A configuration servlet for Adobe AEM 6.0+ used for Grid configuration provisioning.

How to build

  • Copy the settings.xml file in your .m2 directory

Resources/settings.xml

  • Build without SonarQube

mvn clean install -PautoInstallBundle -Pkas-pass

  • Build with Local Analysis

mvn clean install -PautoInstallBundle

  • Build & Analysis Report to SonarQube

mvn clean install -PautoInstallBundle -Pkas-qaqc

SonarQube url

USAGE

Do a POST Request to a path /system/instanceConfiguration.servlet.html of your AEM instance

  • Curl command:
curl -u <USER>:<PASS> \
  -H 'Content-Type:application/json' \
  -H 'Accept: application/json' \
  --data-binary @<MY-FILE.json> \
  -X POST http://<HOST>:<PORT>/system/instanceConfiguration.servlet.html

Options available

  1. OSGi Configurations

    • Update or Create
  2. Users

    • Create
    • Update
    • Change password
  3. Replication Agents

    • Create
    • Update
    • Show
    • Delete

JSON Request Examples:

  • OSGi

    • Update or Create
{
  "prodAuthor01": {
    "configs": [
      {
        "policy": "UPDATE_CREATE_POLICY",
        "type": "osgi",
        "id": "com.xumak.jcrsyncr.engine.SyncControllerImpl6.config",
        "path": "/apps/system/config",
        "with": {
          "jcrsync.definitions": [
            "/BedrocK/XCQB/Demo/Source/myCompany/CQFiles/myCompany;/apps/grid"
          ],
          "jcrsync.establish.sync": true,
          "foo": "bar",
          "number": 123
        }
      }
    ]
  }
}
  • User

    • Create a user
{
  "prodAuthor01": {
    "users": [
      {
        "type": "internal",
        "id": "author",
        "password": "LQSc8zGIFToaZbDpZmQVGelaNr7e",
        "policy": "CREATE",
        "with": {
          "profile/aboutMe": "Used the Replication Agents to send everything under /content/*"
        },
        "acls": {
          "deny": {
            "/": [
              "C",
              "R",
              "U",
              "D",
              "X",
              "R*",
              "U*"
            ]
          },
          "allow": {
            "/content": [
              "R"
            ]
          }
        }
      }
    ]
  }
}
  • Update a user
{
  "prodAuthor01": {
    "users": [
      {
        "type": "internal",
        "id": "author",
        "policy": "UPDATE",
        "with": {
          "profile/aboutMe": "Used the Replication Agents to send everything under /content/*"
        },
        "acls": {
          "deny": {
            "/": [
              "C",
              "R",
              "U",
              "D",
              "X",
              "R*",
              "U*"
            ]
          },
          "allow": {
            "/content": [
              "R"
            ]
          }
        }
      }
    ]
  }
}
  • Change password
{
  "prodAuthor01": {
    "users": [
      {
        "policy": "CHANGE_PASSWORD",
        "type": "root",
        "id": "abc",
        "password": "12345",
        "newPassword": "admin"
      }
    ]
  }
}
  • Replication Agents

    • Create, Update, Delete, Show
{
  "prodAuthor01": {
    "replicationAgents": [
      {
        "type": "publish",
        "name": "toProdPublish1",
        "policy": "CREATE",
        "with": {
          "jcr:title": "Replication Agent for ProdPublish1",
          "enabled": true,
          "userId": "allContentSender",
          "host": "prod.publish1.customer.xumak.cloud",
          "port": 5501,
          "transportUser": "allContentReceiver",
          "transportPassword": "zzhV4gaDuxF9HUcdDaJhajjA",
          "currentVersion": "832-040312048-1pou4poiup4oi123u4pio13up4"
        }
      },
      {
        "type": "publish",
        "name": "toProdPublish1",
        "policy": "UPDATE",
        "with": {
          "foo": "bar"
        }
      },
      {
        "type": "publish",
        "name": "toProdPublish1",
        "policy": "SHOW"
      },
      {
        "type": "publish",
        "name": "toProdPublish1",
        "policy": "DELETE"
      },
      {
        "type": "publish",
        "policy": "SHOW"
      }
    ]
  }
}

Copyright © 2016 Tikal Technologies, Inc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.