Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • W Waarp Gateway
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 48
    • Issues 48
    • List
    • Boards
    • Service Desk
    • Milestones
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Applications
  • Waarp Gateway
  • Waarp Gateway
  • Issues
  • #266
Closed
Open
Issue created Jul 23, 2021 by Bruno Carlin@bruno.carlinOwner

Bad authorization when importing a json file

I have the following file which defines two local servers, with one account each, and a rule with only one agent authorized

{
    "locals": [
      {
        "name": "gw-r66",
        "protocol": "r66",
        "address": "127.0.0.1:6668",
        "configuration": {
          "serverLogin": "gw-r66",
          "serverPassword": "password"
        },
        "accounts": [
          {
            "login": "central",
            "password": "password"
          }
        ]
      }, {
        "name": "gw-sftp",
        "protocol": "sftp",
        "address": "127.0.0.1:6622",
        "configuration": { },
        "accounts": [
          {
            "login": "partner",
            "password": "password"
          }
        ]
      }
    ],
    "rules": [
      {
        "name": "config-gw_2",
        "isSend": false,
        "path": "/config-gw_2",
        "pre": null,
        "post": [
          {
            "type": "EXEC",
            "args": {
              "args": "#TRUEFULLPATH#",
              "delay": "0",
              "path": "updateconf"
            }
          },
          {
            "type": "DELETE",
            "args": {}
          }
        ],
        "error": null,
        "auth": [
          "local::gw-r66::central"
        ],
        "inPath": "",
        "outPath": "",
        "workPath": ""
      }
    ]
  }

When I import it, both accounts are listed in the authorized agent:

$ wg rule list
Rules:
● Rule config-gw_2 (receive)
    Comment:        
    Path:           /config-gw_2
    In directory:   
    Out directory:  
    Work directory: 
    Pre tasks:
    Post tasks:
    ├─Command EXEC with args: {"args":"#TRUEFULLPATH#","delay":"0","path":"updateconf"}
    └─Command DELETE with args: {}
    Error tasks:
    Authorized agents:
    ├─Servers:          
    ├─Partners:         
    ├─Server accounts:  gw-r66.central, gw-sftp.partner
    └─Partner accounts: 
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking