[Info-vax] : AUTHORIZE Enhancement

Bob Gezelter gezelter at rlgsc.com
Sun Nov 20 08:08:05 EST 2016


On Sunday, November 20, 2016 at 1:28:49 AM UTC-5, IanD wrote:
> On Sunday, November 20, 2016 at 4:37:54 AM UTC+11, Art wrote:
> > While we're asking for shiny new things from VMS, could I ask for a simple (?) change whereby the output from e.g. MCR AUTHORIZE LIST * /FULL could be "enhanced" with /OUTPUT=SOMEWHERE_OTHER_THAN____SYSUAF.LIS ?
> > 
> > I know I can do DEFINE SYS$OUTPUT etc. but c'mon, /OUT= please.
> > 
> > Thanks in advance,
> > Art
> 
> Can we also add support for input/output in other formats also?
> 
> I'm thinking not just UAF but every utility in VMS (in your spare time of course!)
> 
> i.e.
> 
> mc authorize list */out=x.x/format=CSV
> or
> /format=JSON
> or
> /format=XML
> 
> Maybe qualify this by a /fields=(OWNER,PRIV,DEVICE) option also?
> 
> mc authorize list */out=x.x/format=CSV/fields=(USERNAME,OWNER)
> 
> The notion of moving data in/out of VMS utilities easily would save people a lot of time and/or reduce some of the frustration I experience when dealing with VMS data and having to resort to DCL scripts just to get simple report data out of VMS
> 
> mc authorize list */out=disusered_accounts.xml/format=XML/fields=(USERNAME,FLAG=(disuser))
> 
> has got to be easier than dumping the uaf, searching a window for disuered accounts and then sub-searching for username
> 
> Perhaps enhanced redirection / better piping might mitigate some of the frustration but I still think the need to easily export / input data in universally used formats like csv, json and xml natively has got to make people's life a lot easier?
> 
> I believe there is a unix project that someone started a while back that was looking at a similar idea of having csv as a minimum available in every tool for input / output. We can go one further by also supporting json and xml perhaps
> 
> Maybe have some type of universal parser that we can throw the input / output through versus changing every utility might be a better idea? Then over time, we just keep adding the different utilities it knows about

Robert,

A supplement for your list (and perhaps, far, far easier).

Rather than get into the admittedly large (but, alas, not infinite) number of possible output formats, I would propose a different solution, involving three modest components:

- Officially "define" an data structure directly related to the union of the UAF/RIGHTSLIST data

- Then split the output processing functionality of AUTHORIZE into a separate shareable library image (e.g., AUTHORIZE_PRINTABLE). Document the interfaces to the shareable image. Provide the code for the PRINTABLE function as an example in SYS$EXAMPLES.

- Lastly, add a /FORMAT[=PRINTABLE] and /OUTPUT qualifiers to the command line options recognized by AUTHORIZE. The /FORMAT qualifier provides the second portion of the name for the sharable image formatting functionality.

Such a change serves several purposes:

- Implementing a printing format is now a easily done (and supported project) [Note: The benefit over writing one's own full program is that one can leverage other AUTHORIZE functionality (e.g., wildcards)].

- It gets VSI out of the "just one more format" loop.

- It provides a demonstrator for a general pattern for other utilities throughout OpenVMS.

My other suggestion along these lines is to split utilities along the command interface/functionality access. This split, which could be done at the same time as the formatting change, would make it far easier to invoke utility functions from non-command line sources (e.g., www scripts; GUIs; and scripting libraries).

- Bob Gezelter, http://www.rlgsc.com



More information about the Info-vax mailing list