Difference between revisions of "Authorization control library"

From Gcube Wiki
Jump to: navigation, search
Line 17: Line 17:
 
since this library use ''aspectJ'' this dependency must be added to the dependecy management
 
since this library use ''aspectJ'' this dependency must be added to the dependecy management
  
<code>
+
<syntaxhighlight lang="xml">
 
<dependency>
 
<dependency>
 
<groupId>org.aspectj</groupId>
 
<groupId>org.aspectj</groupId>
Line 23: Line 23:
 
<version>1.8.2</version>
 
<version>1.8.2</version>
 
</dependency>
 
</dependency>
</code>
+
</syntaxhighlight>
  
 
the plugin must be declared in the ''plugins'' block   
 
the plugin must be declared in the ''plugins'' block   

Revision as of 16:34, 14 September 2022

Contents

Authorization Control Library allows gcube services to automatically filter methods using specific rules based on user roles

How To

To enable authorization control on your gcube service the following dependency must be added

<dependency> <groupId>org.gcube.common</groupId>

       <artifactId>authorization-control-library</artifactId>

</dependency>

since this library use aspectJ this dependency must be added to the dependecy management

<dependency>
	<groupId>org.aspectj</groupId>
	<artifactId>aspectjrt</artifactId>
	<version>1.8.2</version>
</dependency>

the plugin must be declared in the plugins block

<plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId> </plugin> ...

and execution added in the build block

<build>

     ...
     <pluginManagement>
       <plugin>

<groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId> <version>1.7</version> <configuration> <complianceLevel>1.8</complianceLevel>

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, aimms, algol68, apache, applescript, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, caddcl, cadlisp, cfdg, cfm, chaiscript, chapel, cil, clojure, cmake, cobol, coffeescript, cpp, csharp, css, cuesheet, d, dart, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, ezt, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, ispfpanel, j, java, java5, javascript, jcl, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nginx, nimrod, nsis, oberon2, objc, objeck, ocaml, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, pic16, pike, pixelbender, pli, plsql, postgresql, postscript, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, qml, racket, rails, rbs, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, rust, sas, scala, scheme, scilab, scl, sdlbasic, smalltalk, smarty, spark, sparql, sql, standardml, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vbscript, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xpp, yaml, z80, zxbasic


1.8

<target>1.8</target> <aspectLibraries> <aspectLibrary> <groupId>org.gcube.common</groupId> <artifactId>authorization-control-library</artifactId> </aspectLibrary> </aspectLibraries> </configuration> <executions> <execution> <goals> <goal>compile</goal> </goals> </execution> </executions> </plugin> ...