YAML Error Importing ACL

Moderator: crythias

Post Reply
samk137
Znuny newbie
Posts: 2
Joined: 16 Mar 2018, 18:01
Znuny Version: OTRS6
Real Name: Samuel Kirsch
Company: TeamWorld Inc
Location: Binghamton, NY

YAML Error Importing ACL

Post by samk137 »

Hello All,

I am trying to customize OTRS to use for our internal ticketing system. I'm pretty new to OTRS and YAML files. I'm trying to create an ACL to limit services shown for specific Queues. It's a relatively long list of 'services' we are importing from our old system, and so I decided I'd create an ACL that had a couple options in it, I'd export it, fill in the rest in a better user interface for that and then import it.

I've run my .YML file through the YAML Parser and it doesn't look like I've got anything out of place. I removed all the top level fields besides the ones I'm using so Name, Description, ConfigMatch and ConfigChange are the only 'top-level' items.

When I upload I receive this error:

Code: Select all

Backend ERROR: OTRS-CGI-74 Perl: 5.22.1 OS: linux Time: Wed Mar 21 13:16:01 2018

 Message: Couldn't read ACL configuration file. Please make sure the file is valid.

 RemoteAddress: 10.1.1.116
 RequestURI: /otrs/index.pl

 Traceback (30407): 
   Module: Kernel::Output::HTML::Layout::Error Line: 1021
   Module: Kernel::Output::HTML::Layout::ErrorScreen Line: 1002
   Module: Kernel::Modules::AdminACL::Run Line: 86
   Module: Kernel::System::Web::InterfaceAgent::Run Line: 1102
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler Line: 40
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

Here is the trimmed-down version of the yml file:

Code: Select all

---
  Comment: ''
  ConfigChange:
    Possible:
      Ticket:
        Service:
        - PC&User Accounts
        - PC&User Accounts::Account Setup
        - PC&User Accounts::Employee Absence
        - PC&User Accounts::Employee Separation
        - PC&User Accounts::New Employee Setup
        - PC&User Accounts::PC Setup
        - PC&User Accounts::PC Teardown/Relocation
        - PC&User Accounts::Password Reset
        - Systems
        - Systems::Alarm System
        - Systems::Camera System
        - Systems::Confluence
        - Systems::Phone System
        - Systems::PickPro
        - Systems::Salesforce
        - Systems::Sportzpak
        - Systems::Sharepoint
        - Systems::Timekeeping System
        - Systems::WSUS
        - Security
        - Security::AntiVirus/Kaspersky
        - Security::Spam Processing
        - Security::Malware Removal
        - Security::Firewall Configuration
        - Tasks
        - Tasks::Backup 
        - Tasks::Restore/Data Recovery
        - Tasks::Conference Room Setup
        - Tasks::Domain or SSL Renewal
        - Tasks::Excel or Database Work
        - Tasks::Exchange Development
        - Tasks::File Conversion
        - Tasks::Group Policy Changes
        - Tasks::Hardware Setup
        - Tasks::Multimedia Work
        - Tasks::Preventative Maintenance
        - Tasks::Asset Tagging
        - Tasks::Server Account Deletion
        - Tasks::Server Rack Work/Maintenance/Monitoring
        - Tasks::Server Updates
        - Tasks::Software Installation
        - Tasks::UPS Setup/Maintenance
        - Tasks::USB Loading
        - Tasks::Wipe and Reinstall
        - Utilities
        - Utilities::Bottle Schedule
        - Utilities::Label Printing
        - Utilities::Outlook Add-ins
        - Peripheral Systems
        - Peripheral Systems::BulkPro/Handhelds
        - Peripheral Systems::Phones - Mobile
        - Peripheral Systems::Print Job
        - Peripheral Systems::Television
        - Administrative
        - Administrative::Documentation
        - Administrative::Inventory
        - Administrative::Networking
        - Administrative::PC Lifecycle Management
        - Administrative::Procurement
        - Administrative::Project Planning
        - Administrative::Training/Webinar
        - Troubleshooting
        - Troubleshooting::Forensics/Investigation
        - Troubleshooting::Account
        - Troubleshooting::Display(s)
        - Troubleshooting::Email
        - Troubleshooting::Fax
        - Troubleshooting::Other
        - Troubleshooting::PC
        - Troubleshooting::Network Connectivity
        - Troubleshooting::Printer
        - Troubleshooting::Scanner
        - Troubleshooting::Server
        - Troubleshooting::Software
        - Other(IT)
        - Systems Integration
        - Systems Integration::Automation
        - Systems Integration::Scripting/Programming
        - Systems Integration::Reporting
        - Systems Integration::Virtualization
    PossibleNot:
      Ticket:
        Service: []
  ConfigMatch:
    Properties:
      Queue:
        Name:
        - IT
  Description: Ties the IT Queue into IT-related Services.
  Name: IT Queue to Services
Any help would be greatly appreciated!
samk137
Znuny newbie
Posts: 2
Joined: 16 Mar 2018, 18:01
Znuny Version: OTRS6
Real Name: Samuel Kirsch
Company: TeamWorld Inc
Location: Binghamton, NY

Re: YAML Error Importing ACL

Post by samk137 »

otrs-acl-import.PNG
So, I figured this out.

If anyone else who is not experience with YAML comes across this post: Its very sensitive to how lines are terminated and also trailing spaces. If you've done anything where your entries in YAML have a trailing space or are missing carriage return, or if your actual Service has a trailing space (I imagine these sorts of things only happen if you're injecting data into the database, because after I fixed the carriage return a few still were not showing and it was due to whatever REGEX I'd used to parse out and then format my SQL INSERTS left some oddball trailing spaces on the services themselves.)
You do not have the required permissions to view the files attached to this post.
Post Reply