oci-policy-generator icon indicating copy to clipboard operation
oci-policy-generator copied to clipboard

Get error when I select "Group (1)" in OCI Policy Generator

Open camcco05 opened this issue 5 years ago • 1 comments

First off, this is a great program, thank you! However, I'm running into one issue ...

When I select either User (0) or Service (2), I have no problem. However, when I select Group (1), I get the following error:

recursive$ pwd /Users/fakeusername/github_clones/oci-policy-generator/src/main/groovy/codes/recursive recursive$ more setup_OCI_policy_generator_with_java.txt

$ sudo jenv local 14.0 $ jenv doctor
[OK] JAVA_HOME variable probably set by jenv PROMPT [OK] Java binaries in path are jenv shims [OK] Jenv is correctly loaded $ groovy --version
Groovy Version: 3.0.6 JVM: 14.0.1 Vendor: Oracle Corporation OS: Mac OS X $ echo $JAVA_HOME
/Users/fakeusername/.jenv/versions/14.0 $ groovy PolicyGenerator.groovy

recursive$ groovy PolicyGenerator.groovy


/ __ / / / / __ _ / ()_____ __ / / ____ ___ _________ / /__ _____ / / / / / / / / // / __ / / / / / / / / / _/ _ / __ / _ / / __ `/ __/ __ / / / // / // / / ___/ // / / / // // / / // / __/ / / / __/ / / // / // // / /
_
/_// // _///_/_, / _/_// //_// _,/_/_//
/
__/

OCI Policy Generator v0.3 is using OCI CLI version 2.15.0.

Any User (0), Group (1) or Service (2)? 1 Caught: java.lang.IllegalArgumentException: Text must not be null or empty java.lang.IllegalArgumentException: Text must not be null or empty at codes.recursive.OciPolicyGenerator.listSubjects(PolicyGenerator.groovy:761) at codes.recursive.OciPolicyGenerator$listSubjects$3.callCurrent(Unknown Source) at codes.recursive.OciPolicyGenerator.generate(PolicyGenerator.groovy:416) at codes.recursive.OciPolicyGenerator$generate.call(Unknown Source) at codes.recursive.PolicyGenerator.run(PolicyGenerator.groovy:767) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Leaving so soon???? recursive$

Here is a little more information about my Mac, if this helps:

fakeusername$ system_profiler SPSoftwareDataType

Software:

System Software Overview:

  System Version: macOS 11.0.1 (20B29)
  Kernel Version: Darwin 20.1.0
  Boot Volume: Macintosh SSD
  Boot Mode: Normal
  User Name: 
  Secure Virtual Memory: Enabled
  System Integrity Protection: Enabled
  Time since boot: 

fakeusername$ brew --version
Homebrew 2.6.0

Thanks so much for all the help and I look forward to hearing back from you!

camcco05 avatar Dec 01 '20 23:12 camcco05

I just thought of something. You said on your main page, "Please ensure that you have the OCI CLI installed and configured on the machine where you run this script." I assume this code needs to be on a machine where a IAM service is setup, correct? That maybe my issue. I'm running this code locally just to get the OCI policy syntax. If that is the case, I'll just use the "Any User" option.

camcco05 avatar Dec 01 '20 23:12 camcco05