This is an automated email from the ASF dual-hosted git repository.

hsluoyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/casbin-jcasbin.git


The following commit(s) were added to refs/heads/master by this push:
     new 8424ca1  build: prepare JCasbin 1.100.0 source release (#530)
8424ca1 is described below

commit 8424ca10b2a549ccefeb9d426b2f57f093e89bb6
Author: Emery <[email protected]>
AuthorDate: Fri Sep 11 09:16:51 2026 +0800

    build: prepare JCasbin 1.100.0 source release (#530)
---
 .editorconfig                                      | 17 ++++++
 .github/semantic.yml                               | 17 ++++++
 .github/workflows/maven-ci.yml                     | 17 ++++++
 .github/workflows/maven-publish.yml                | 37 ++++++++++++-
 .github/workflows/release.yml                      | 29 +++++++++-
 .gitignore                                         | 17 ++++++
 BUILDING.md                                        | 49 +++++++++++++++++
 README.md                                          | 19 +++++++
 examples/abac_model.conf                           | 17 ++++++
 examples/abac_not_using_policy_model.conf          | 17 ++++++
 examples/abac_rule_custom_function_model.conf      | 17 ++++++
 examples/abac_rule_custom_function_policy.csv      | 17 ++++++
 examples/abac_rule_effect_policy.csv               | 17 ++++++
 examples/abac_rule_map_model.conf                  | 17 ++++++
 examples/abac_rule_model.conf                      | 17 ++++++
 examples/abac_rule_policy.csv                      | 17 ++++++
 examples/abac_rule_with_domains_model.conf         | 17 ++++++
 examples/abac_rule_with_domains_policy.csv         | 17 ++++++
 examples/basic_inverse_policy.csv                  | 17 ++++++
 examples/basic_model.conf                          | 17 ++++++
 examples/basic_model_without_spaces.conf           | 17 ++++++
 examples/basic_policy.csv                          | 17 ++++++
 examples/basic_with_root_model.conf                | 17 ++++++
 examples/basic_without_resources_model.conf        | 17 ++++++
 examples/basic_without_resources_policy.csv        | 17 ++++++
 examples/basic_without_users_model.conf            | 17 ++++++
 examples/basic_without_users_policy.csv            | 17 ++++++
 examples/comment_model.conf                        | 17 ++++++
 examples/config/testini.ini                        | 17 ++++++
 examples/glob_model.conf                           | 17 ++++++
 examples/glob_policy.csv                           | 17 ++++++
 examples/group_with_domain_model.conf              | 17 ++++++
 examples/group_with_domain_policy.csv              | 17 ++++++
 examples/haslink_synchronized_model.conf           | 17 ++++++
 examples/in_op_sytanx.conf                         | 17 ++++++
 examples/in_op_sytanx.csv                          | 17 ++++++
 examples/ipmatch_model.conf                        | 17 ++++++
 examples/ipmatch_policy.csv                        | 17 ++++++
 examples/keymatch2_model.conf                      | 17 ++++++
 examples/keymatch2_policy.csv                      | 17 ++++++
 examples/keymatch4_model.conf                      | 17 ++++++
 examples/keymatch4_policy.csv                      | 17 ++++++
 examples/keymatch5_model.conf                      | 17 ++++++
 examples/keymatch5_policy.csv                      | 17 ++++++
 examples/keymatch_custom_model.conf                | 17 ++++++
 examples/keymatch_model.conf                       | 17 ++++++
 examples/keymatch_policy.csv                       | 17 ++++++
 examples/keymatch_with_rbac_in_domain.conf         | 17 ++++++
 examples/keymatch_with_rbac_in_domain.csv          | 17 ++++++
 examples/multiline_model.conf                      | 17 ++++++
 examples/multiline_policy.csv                      | 17 ++++++
 examples/multiple_policy_definitions_model.conf    | 17 ++++++
 examples/multiple_policy_definitions_policy.csv    | 17 ++++++
 examples/object_conditions_model.conf              | 17 ++++++
 examples/object_conditions_policy.csv              | 17 ++++++
 .../rbac_with_pattern_large_scale_model.conf       | 17 ++++++
 .../rbac_with_pattern_large_scale_policy.csv       | 17 ++++++
 examples/priority_hierachy_policy.conf             | 17 ++++++
 examples/priority_hierachy_policy.csv              | 17 ++++++
 examples/priority_indeterminate_policy.csv         | 17 ++++++
 examples/priority_model.conf                       | 17 ++++++
 examples/priority_model_explicit.conf              | 17 ++++++
 examples/priority_policy.csv                       | 17 ++++++
 examples/priority_policy_explicit.csv              | 17 ++++++
 examples/rbac_model.conf                           | 17 ++++++
 examples/rbac_model_in_multi_line.conf             | 17 ++++++
 examples/rbac_policy.csv                           | 17 ++++++
 examples/rbac_with_all_pattern_model.conf          | 17 ++++++
 examples/rbac_with_all_pattern_policy.csv          | 17 ++++++
 examples/rbac_with_deny_model.conf                 | 17 ++++++
 examples/rbac_with_deny_policy.csv                 | 17 ++++++
 examples/rbac_with_domain_pattern_model.conf       | 17 ++++++
 examples/rbac_with_domain_pattern_policy.csv       | 17 ++++++
 .../rbac_with_domain_temporal_roles_model.conf     | 17 ++++++
 .../rbac_with_domain_temporal_roles_policy.csv     | 17 ++++++
 examples/rbac_with_domains_model.conf              | 17 ++++++
 examples/rbac_with_domains_policy.csv              | 17 ++++++
 examples/rbac_with_hierarchy_policy.csv            | 17 ++++++
 .../rbac_with_hierarchy_policy_without_role.csv    | 17 ++++++
 examples/rbac_with_multiple_policy_model.conf      | 17 ++++++
 examples/rbac_with_multiple_policy_policy.csv      | 17 ++++++
 examples/rbac_with_not_deny_model.conf             | 17 ++++++
 examples/rbac_with_pattern_model.conf              | 17 ++++++
 examples/rbac_with_pattern_policy.csv              | 17 ++++++
 examples/rbac_with_pattern_regex_policy.csv        | 17 ++++++
 .../rbac_with_resource_roles_and_domain_model.conf | 17 ++++++
 .../rbac_with_resource_roles_and_domain_policy.csv | 17 ++++++
 examples/rbac_with_resource_roles_model.conf       | 17 ++++++
 examples/rbac_with_resource_roles_policy.csv       | 17 ++++++
 examples/rbac_with_temporal_roles_model.conf       | 17 ++++++
 examples/rbac_with_temporal_roles_policy.csv       | 17 ++++++
 examples/subject_priority_model_with_domain.conf   | 17 ++++++
 examples/subject_priority_policy_with_domain.csv   | 17 ++++++
 maven-settings.xml                                 | 19 +++++++
 pom.xml                                            | 64 +++++++++++++++++++++-
 .../org/casbin/jcasbin/main/FrontendUnitTest.java  | 10 +++-
 .../main/InternalEnforcerWithDispatcherTest.java   | 17 ++++++
 .../casbin/jcasbin/main/TestAviatorValidation.java | 17 ++++++
 98 files changed, 1768 insertions(+), 6 deletions(-)

diff --git a/.editorconfig b/.editorconfig
index b983870..5bdb464 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 root = true
 
 [*]
diff --git a/.github/semantic.yml b/.github/semantic.yml
index 96f9233..35155b6 100644
--- a/.github/semantic.yml
+++ b/.github/semantic.yml
@@ -1,2 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 # Always validate the PR title AND all the commits
 titleAndCommits: true
diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml
index 70be2c9..dedb8c5 100644
--- a/.github/workflows/maven-ci.yml
+++ b/.github/workflows/maven-ci.yml
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 # This workflow will build a Java project with Maven
 # For more information see: 
https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
 
diff --git a/.github/workflows/maven-publish.yml 
b/.github/workflows/maven-publish.yml
index 4ba9a09..d8c7639 100644
--- a/.github/workflows/maven-publish.yml
+++ b/.github/workflows/maven-publish.yml
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 name: Publish Maven
 
 on:
@@ -27,6 +44,25 @@ jobs:
         with:
           fetch-depth: 0
 
+      - name: Verify the committed release version
+        env:
+          MAVEN_VERSION: ${{ inputs.maven_version }}
+        run: |
+          set -euo pipefail
+          python3 - <<'PY'
+          import os
+          import re
+          import xml.etree.ElementTree as ET
+          requested = os.environ['MAVEN_VERSION']
+          if not re.fullmatch(r'[0-9]+\.[0-9]+\.[0-9]+', requested):
+              raise SystemExit('Expected a final Maven release version X.Y.Z')
+          if os.environ['GITHUB_REF'] != f'refs/tags/v{requested}':
+              raise SystemExit('Publish only from the matching final release 
tag after the vote')
+          version = 
ET.parse('pom.xml').getroot().findtext('{http://maven.apache.org/POM/4.0.0}version')
+          if version != requested:
+              raise SystemExit(f'POM version mismatch: expected {requested}, 
got {version}')
+          PY
+
       - name: Set up JDK 1.8
         uses: actions/setup-java@v4
         with:
@@ -40,7 +76,6 @@ jobs:
 
       - name: Publish Maven
         run: |
-          mvn -B org.codehaus.mojo:versions-maven-plugin:2.16.2:set 
-DnewVersion="${{ inputs.maven_version }}" -DgenerateBackupPoms=false
           mvn -B deploy -DskipTests
         env:
           GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 4e5aa94..70e23ed 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 name: Release
 
 # Releases are cut manually by pushing a git tag:
@@ -36,6 +53,7 @@ jobs:
       - name: Compute release metadata
         id: meta
         run: |
+          set -euo pipefail
           TAG_NAME="${GITHUB_REF_NAME}"
 
           if [[ "${TAG_NAME}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
@@ -49,7 +67,16 @@ jobs:
 
           VERSION="${TAG_NAME#v}"
           BASE_VERSION="${VERSION%%-rc*}"
-          BASENAME="apache-casbin-jcasbin-${VERSION}-incubating-src"
+          # Keep the voted source bytes stable when the same commit is 
promoted.
+          BASENAME="apache-casbin-jcasbin-${BASE_VERSION}-incubating-src"
+          export BASE_VERSION
+          python3 - <<'PY'
+          import os
+          import xml.etree.ElementTree as ET
+          version = 
ET.parse('pom.xml').getroot().findtext('{http://maven.apache.org/POM/4.0.0}version')
+          if version != os.environ['BASE_VERSION']:
+              raise SystemExit(f"Commit the release version to pom.xml first: 
expected {os.environ['BASE_VERSION']}, got {version}")
+          PY
           PREVIOUS_TAG="$(
             {
               git tag --list 'v*' | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$'
diff --git a/.gitignore b/.gitignore
index b9b69a2..d5f71ed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 # Compiled class file
 *.class
 
diff --git a/BUILDING.md b/BUILDING.md
new file mode 100644
index 0000000..c0e89cf
--- /dev/null
+++ b/BUILDING.md
@@ -0,0 +1,49 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+    https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Building JCasbin from a source archive
+
+Use a JDK 8 installation and Maven 3.9.x. Set `JAVA_HOME` to the JDK and
+place Maven on `PATH`. Dependencies are downloaded from Maven repositories.
+
+From the extracted archive's top-level directory, run:
+
+```sh
+mvn -B -ntp clean verify -Dgpg.skip=true
+```
+
+In PowerShell, quote the property argument:
+
+```powershell
+mvn -B -ntp clean verify '-Dgpg.skip=true'
+```
+
+This compiles Java sources, runs the TestNG suite, and builds the library,
+source and Javadoc JARs under `target/`. The property disables artifact
+signing for an ordinary build; this command does not deploy artifacts.
+Do not use `deploy` when reviewing a release candidate.
+
+Some persistence tests rewrite example policy files. Run tests on a disposable
+extraction and preserve the original downloaded archive and its signature.
+
+Release preparation commits the intended Maven version to `pom.xml`. An RC tag
+`vX.Y.Z-rcN` and the corresponding final tag must refer to the reviewed commit.
+The source archive name omits the RC number so promotion preserves the voted
+bytes. The archive, checksum and signature actually approved by the community
+must be promoted unchanged; a successful local build is not release approval.
diff --git a/README.md b/README.md
index a901a9e..ae9175d 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,22 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+    https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
 # jCasbin
 
 [![GitHub 
Actions](https://github.com/apache/casbin-jcasbin/workflows/build/badge.svg)](https://github.com/apache/casbin-jcasbin/actions)
diff --git a/examples/abac_model.conf b/examples/abac_model.conf
index 44d0604..13d0a27 100644
--- a/examples/abac_model.conf
+++ b/examples/abac_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/abac_not_using_policy_model.conf 
b/examples/abac_not_using_policy_model.conf
index 3dfaae4..eec071c 100644
--- a/examples/abac_not_using_policy_model.conf
+++ b/examples/abac_not_using_policy_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/abac_rule_custom_function_model.conf 
b/examples/abac_rule_custom_function_model.conf
index 3ebaa45..389462f 100644
--- a/examples/abac_rule_custom_function_model.conf
+++ b/examples/abac_rule_custom_function_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/abac_rule_custom_function_policy.csv 
b/examples/abac_rule_custom_function_policy.csv
index 808adbd..e44804b 100644
--- a/examples/abac_rule_custom_function_policy.csv
+++ b/examples/abac_rule_custom_function_policy.csv
@@ -1,2 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, r.sub.name == 'alice' && custom(r.obj), r.obj, GET
 p, r.sub.age >= 18 && custom(r.obj), r.obj, GET
diff --git a/examples/abac_rule_effect_policy.csv 
b/examples/abac_rule_effect_policy.csv
index aa47394..6d46a20 100644
--- a/examples/abac_rule_effect_policy.csv
+++ b/examples/abac_rule_effect_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, /data1, read, deny
 p, alice, /data1, write, allow
 p, bob, /data2, write, deny
diff --git a/examples/abac_rule_map_model.conf 
b/examples/abac_rule_map_model.conf
index 44d0604..13d0a27 100644
--- a/examples/abac_rule_map_model.conf
+++ b/examples/abac_rule_map_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/abac_rule_model.conf b/examples/abac_rule_model.conf
index eebfc13..4866c12 100644
--- a/examples/abac_rule_model.conf
+++ b/examples/abac_rule_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/abac_rule_policy.csv b/examples/abac_rule_policy.csv
index be29ded..be0c7a9 100644
--- a/examples/abac_rule_policy.csv
+++ b/examples/abac_rule_policy.csv
@@ -1,2 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, r.sub.Age > 18, /data1, read
 p, r.sub.Age < 60, /data2, write
diff --git a/examples/abac_rule_with_domains_model.conf 
b/examples/abac_rule_with_domains_model.conf
index 3197c19..99a8148 100644
--- a/examples/abac_rule_with_domains_model.conf
+++ b/examples/abac_rule_with_domains_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, domain, obj, act
 
diff --git a/examples/abac_rule_with_domains_policy.csv 
b/examples/abac_rule_with_domains_policy.csv
index 095bebf..c40d1c2 100644
--- a/examples/abac_rule_with_domains_policy.csv
+++ b/examples/abac_rule_with_domains_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, r.domain == 'domain1', admin, domain1, data1, read
 p, r.domain == 'domain1', admin, domain1, data1, write
 p, r.domain == 'domain2', admin, domain2, data2, read
diff --git a/examples/basic_inverse_policy.csv 
b/examples/basic_inverse_policy.csv
index 276c440..cb3c80f 100644
--- a/examples/basic_inverse_policy.csv
+++ b/examples/basic_inverse_policy.csv
@@ -1,2 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, data1, write
 p, bob, data2, read
\ No newline at end of file
diff --git a/examples/basic_model.conf b/examples/basic_model.conf
index dc6da81..8edf49b 100644
--- a/examples/basic_model.conf
+++ b/examples/basic_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/basic_model_without_spaces.conf 
b/examples/basic_model_without_spaces.conf
index a5b49fe..f879491 100644
--- a/examples/basic_model_without_spaces.conf
+++ b/examples/basic_model_without_spaces.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub,obj,act
 
diff --git a/examples/basic_policy.csv b/examples/basic_policy.csv
index 371911b..cb9f50f 100644
--- a/examples/basic_policy.csv
+++ b/examples/basic_policy.csv
@@ -1,2 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, data1, read
 p, bob, data2, write
\ No newline at end of file
diff --git a/examples/basic_with_root_model.conf 
b/examples/basic_with_root_model.conf
index 8f13907..b5db70f 100644
--- a/examples/basic_with_root_model.conf
+++ b/examples/basic_with_root_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/basic_without_resources_model.conf 
b/examples/basic_without_resources_model.conf
index f61bd71..73239cb 100644
--- a/examples/basic_without_resources_model.conf
+++ b/examples/basic_without_resources_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, act
 
diff --git a/examples/basic_without_resources_policy.csv 
b/examples/basic_without_resources_policy.csv
index c861941..920a26f 100644
--- a/examples/basic_without_resources_policy.csv
+++ b/examples/basic_without_resources_policy.csv
@@ -1,2 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, read
 p, bob, write
\ No newline at end of file
diff --git a/examples/basic_without_users_model.conf 
b/examples/basic_without_users_model.conf
index 1fe5993..89c877f 100644
--- a/examples/basic_without_users_model.conf
+++ b/examples/basic_without_users_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = obj, act
 
diff --git a/examples/basic_without_users_policy.csv 
b/examples/basic_without_users_policy.csv
index 79048da..d9f15ec 100644
--- a/examples/basic_without_users_policy.csv
+++ b/examples/basic_without_users_policy.csv
@@ -1,2 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, data1, read
 p, data2, write
\ No newline at end of file
diff --git a/examples/comment_model.conf b/examples/comment_model.conf
index 3608b43..599c953 100644
--- a/examples/comment_model.conf
+++ b/examples/comment_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act ; Request definition
 
diff --git a/examples/config/testini.ini b/examples/config/testini.ini
index 763ada1..8a9f031 100644
--- a/examples/config/testini.ini
+++ b/examples/config/testini.ini
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 # test config
 debug = true
 url = act.wiki
diff --git a/examples/glob_model.conf b/examples/glob_model.conf
index 838d9ad..74a02b5 100644
--- a/examples/glob_model.conf
+++ b/examples/glob_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/glob_policy.csv b/examples/glob_policy.csv
index 2d44a72..5477021 100644
--- a/examples/glob_policy.csv
+++ b/examples/glob_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, u1, /foo/*, read
 p, u2, /foo*, read
 p, u3, /*/foo/*, read
diff --git a/examples/group_with_domain_model.conf 
b/examples/group_with_domain_model.conf
index e8b7b93..697e754 100644
--- a/examples/group_with_domain_model.conf
+++ b/examples/group_with_domain_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, dom, obj, act
 
diff --git a/examples/group_with_domain_policy.csv 
b/examples/group_with_domain_policy.csv
index bf534b7..760126a 100644
--- a/examples/group_with_domain_policy.csv
+++ b/examples/group_with_domain_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, admin, domain1, data1, read
 g, alice, group1
 g2, group1, admin, domain1
\ No newline at end of file
diff --git a/examples/haslink_synchronized_model.conf 
b/examples/haslink_synchronized_model.conf
index 33b43c4..7873fbb 100644
--- a/examples/haslink_synchronized_model.conf
+++ b/examples/haslink_synchronized_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj
 
diff --git a/examples/in_op_sytanx.conf b/examples/in_op_sytanx.conf
index c39e3d9..72b03d1 100644
--- a/examples/in_op_sytanx.conf
+++ b/examples/in_op_sytanx.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj
 
diff --git a/examples/in_op_sytanx.csv b/examples/in_op_sytanx.csv
index 9257773..aed6a29 100644
--- a/examples/in_op_sytanx.csv
+++ b/examples/in_op_sytanx.csv
@@ -1 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice
diff --git a/examples/ipmatch_model.conf b/examples/ipmatch_model.conf
index 26e4b01..99166d5 100644
--- a/examples/ipmatch_model.conf
+++ b/examples/ipmatch_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/ipmatch_policy.csv b/examples/ipmatch_policy.csv
index ca678a9..adb2884 100644
--- a/examples/ipmatch_policy.csv
+++ b/examples/ipmatch_policy.csv
@@ -1,2 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, 192.168.2.0/24, data1, read
 p, 10.0.0.0/16, data2, write
\ No newline at end of file
diff --git a/examples/keymatch2_model.conf b/examples/keymatch2_model.conf
index 944123d..f1909a1 100644
--- a/examples/keymatch2_model.conf
+++ b/examples/keymatch2_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/keymatch2_policy.csv b/examples/keymatch2_policy.csv
index 941a48f..78794f2 100644
--- a/examples/keymatch2_policy.csv
+++ b/examples/keymatch2_policy.csv
@@ -1,2 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, /alice_data/:resource, GET
 p, alice, /alice_data2/:id/using/:resId, GET
\ No newline at end of file
diff --git a/examples/keymatch4_model.conf b/examples/keymatch4_model.conf
index 1fa6a1f..23b6ad9 100644
--- a/examples/keymatch4_model.conf
+++ b/examples/keymatch4_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/keymatch4_policy.csv b/examples/keymatch4_policy.csv
index 0f1fa32..496bd41 100644
--- a/examples/keymatch4_policy.csv
+++ b/examples/keymatch4_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, /alice_data/resource/{id}/child/{id}, GET
 p, alice, /alice_data/resource/{id}/child{id}, GET
 p, alice, /alice_data/resource/{id}/child/{id}/child2/{id}, GET
diff --git a/examples/keymatch5_model.conf b/examples/keymatch5_model.conf
index cec28e6..5dd189f 100644
--- a/examples/keymatch5_model.conf
+++ b/examples/keymatch5_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/keymatch5_policy.csv b/examples/keymatch5_policy.csv
index 456a4f0..83e3000 100644
--- a/examples/keymatch5_policy.csv
+++ b/examples/keymatch5_policy.csv
@@ -1,2 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, /alice_data/{resource}/.*, GET
 p, alice, /alice_data2/{id}/using/{resId}/.*, GET
\ No newline at end of file
diff --git a/examples/keymatch_custom_model.conf 
b/examples/keymatch_custom_model.conf
index 5197001..0a94d3f 100644
--- a/examples/keymatch_custom_model.conf
+++ b/examples/keymatch_custom_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/keymatch_model.conf b/examples/keymatch_model.conf
index 4f86ba8..d6555b1 100644
--- a/examples/keymatch_model.conf
+++ b/examples/keymatch_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/keymatch_policy.csv b/examples/keymatch_policy.csv
index d6e9b7d..234f94b 100644
--- a/examples/keymatch_policy.csv
+++ b/examples/keymatch_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, /alice_data/*, GET
 p, alice, /alice_data/resource1, POST
 
diff --git a/examples/keymatch_with_rbac_in_domain.conf 
b/examples/keymatch_with_rbac_in_domain.conf
index 35e4bb7..6c3772f 100644
--- a/examples/keymatch_with_rbac_in_domain.conf
+++ b/examples/keymatch_with_rbac_in_domain.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, dom, obj, act
 
diff --git a/examples/keymatch_with_rbac_in_domain.csv 
b/examples/keymatch_with_rbac_in_domain.csv
index f789dbe..9c639cf 100644
--- a/examples/keymatch_with_rbac_in_domain.csv
+++ b/examples/keymatch_with_rbac_in_domain.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 g,can_manage,can_use,*
 
 #engine
diff --git a/examples/multiline_model.conf b/examples/multiline_model.conf
index 42a017e..f818299 100644
--- a/examples/multiline_model.conf
+++ b/examples/multiline_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, dom, obj, act
 
diff --git a/examples/multiline_policy.csv b/examples/multiline_policy.csv
index fcd69dd..4aef763 100644
--- a/examples/multiline_policy.csv
+++ b/examples/multiline_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, domain1, data1, read, allow
 p, bob, domain1, data2, write, allow
 p, data2_admin, domain1, data2, read, allow
diff --git a/examples/multiple_policy_definitions_model.conf 
b/examples/multiple_policy_definitions_model.conf
index 22a3be6..fb59631 100644
--- a/examples/multiple_policy_definitions_model.conf
+++ b/examples/multiple_policy_definitions_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 r2 = sub, obj, act
diff --git a/examples/multiple_policy_definitions_policy.csv 
b/examples/multiple_policy_definitions_policy.csv
index ff74eac..0e2374c 100644
--- a/examples/multiple_policy_definitions_policy.csv
+++ b/examples/multiple_policy_definitions_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, data2_admin, data2, read
 p2, r2.sub.age > 18 && r2.sub.age < 60, /data1, read, allow
 p2, r2.sub.age > 60 && r2.sub.age < 100, /data1, read, deny
diff --git a/examples/object_conditions_model.conf 
b/examples/object_conditions_model.conf
index 0ee53e2..f367c32 100644
--- a/examples/object_conditions_model.conf
+++ b/examples/object_conditions_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/object_conditions_policy.csv 
b/examples/object_conditions_policy.csv
index fc85a96..7a0e234 100644
--- a/examples/object_conditions_policy.csv
+++ b/examples/object_conditions_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, r.obj.price < 25, read
 p, admin, r.obj.category_id = 2, read
 p, bob, r.obj.author = bob, write
diff --git a/examples/performance/rbac_with_pattern_large_scale_model.conf 
b/examples/performance/rbac_with_pattern_large_scale_model.conf
index 19c4052..7666031 100644
--- a/examples/performance/rbac_with_pattern_large_scale_model.conf
+++ b/examples/performance/rbac_with_pattern_large_scale_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/performance/rbac_with_pattern_large_scale_policy.csv 
b/examples/performance/rbac_with_pattern_large_scale_policy.csv
index 5e865a7..4833635 100644
--- a/examples/performance/rbac_with_pattern_large_scale_policy.csv
+++ b/examples/performance/rbac_with_pattern_large_scale_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 # 132 policies / 3000 grouping policies / 300 subjuects / 6 roles
 # Policy - staff001
 p, staff001,             /orgs/{orgID}/sites/{siteID}, 
App001.Module001.Action1001
diff --git a/examples/priority_hierachy_policy.conf 
b/examples/priority_hierachy_policy.conf
index 77b8c4e..202c39c 100644
--- a/examples/priority_hierachy_policy.conf
+++ b/examples/priority_hierachy_policy.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/priority_hierachy_policy.csv 
b/examples/priority_hierachy_policy.csv
index 24a4422..b7a5d11 100644
--- a/examples/priority_hierachy_policy.csv
+++ b/examples/priority_hierachy_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, root, data1, read, deny
 p, admin, data1, read, deny
 
diff --git a/examples/priority_indeterminate_policy.csv 
b/examples/priority_indeterminate_policy.csv
index c4e67cd..cff077e 100644
--- a/examples/priority_indeterminate_policy.csv
+++ b/examples/priority_indeterminate_policy.csv
@@ -1 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, data1, read, intdeterminate
\ No newline at end of file
diff --git a/examples/priority_model.conf b/examples/priority_model.conf
index ece1562..97843ef 100644
--- a/examples/priority_model.conf
+++ b/examples/priority_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/priority_model_explicit.conf 
b/examples/priority_model_explicit.conf
index 3084cba..c4e31d8 100644
--- a/examples/priority_model_explicit.conf
+++ b/examples/priority_model_explicit.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/priority_policy.csv b/examples/priority_policy.csv
index 1ec5e5a..cf02acb 100644
--- a/examples/priority_policy.csv
+++ b/examples/priority_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, data1, read, allow
 p, data1_deny_group, data1, read, deny
 p, data1_deny_group, data1, write, deny
diff --git a/examples/priority_policy_explicit.csv 
b/examples/priority_policy_explicit.csv
index 0042bc8..fcb1a05 100644
--- a/examples/priority_policy_explicit.csv
+++ b/examples/priority_policy_explicit.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, data1_deny_group, data1, read, deny, 10
 p, data1_deny_group, data1, write, deny, 10
 p, data2_allow_group, data2, read, allow, 10
diff --git a/examples/rbac_model.conf b/examples/rbac_model.conf
index 71159e3..cca84c1 100644
--- a/examples/rbac_model.conf
+++ b/examples/rbac_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/rbac_model_in_multi_line.conf 
b/examples/rbac_model_in_multi_line.conf
index a1466fc..1406bcc 100644
--- a/examples/rbac_model_in_multi_line.conf
+++ b/examples/rbac_model_in_multi_line.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/rbac_policy.csv b/examples/rbac_policy.csv
index f93d6df..f24fa61 100644
--- a/examples/rbac_policy.csv
+++ b/examples/rbac_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, data1, read
 p, bob, data2, write
 p, data2_admin, data2, read
diff --git a/examples/rbac_with_all_pattern_model.conf 
b/examples/rbac_with_all_pattern_model.conf
index 045bfa5..55dced7 100644
--- a/examples/rbac_with_all_pattern_model.conf
+++ b/examples/rbac_with_all_pattern_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, dom, obj, act
 
diff --git a/examples/rbac_with_all_pattern_policy.csv 
b/examples/rbac_with_all_pattern_policy.csv
index 8097be8..a0654a3 100644
--- a/examples/rbac_with_all_pattern_policy.csv
+++ b/examples/rbac_with_all_pattern_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, domain1, book_group, read
 p, alice, domain2, book_group, write
 
diff --git a/examples/rbac_with_deny_model.conf 
b/examples/rbac_with_deny_model.conf
index 33749f0..06c82f5 100644
--- a/examples/rbac_with_deny_model.conf
+++ b/examples/rbac_with_deny_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/rbac_with_deny_policy.csv 
b/examples/rbac_with_deny_policy.csv
index b774edb..dd88e44 100644
--- a/examples/rbac_with_deny_policy.csv
+++ b/examples/rbac_with_deny_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, data1, read, allow
 p, bob, data2, write, allow
 p, data2_admin, data2, read, allow
diff --git a/examples/rbac_with_domain_pattern_model.conf 
b/examples/rbac_with_domain_pattern_model.conf
index 57c3721..1eead55 100644
--- a/examples/rbac_with_domain_pattern_model.conf
+++ b/examples/rbac_with_domain_pattern_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, dom, obj, act
 
diff --git a/examples/rbac_with_domain_pattern_policy.csv 
b/examples/rbac_with_domain_pattern_policy.csv
index c8abd35..914c6fd 100644
--- a/examples/rbac_with_domain_pattern_policy.csv
+++ b/examples/rbac_with_domain_pattern_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, admin, domain1, data1, read
 p, admin, domain1, data1, write
 p, admin, domain2, data2, read
diff --git a/examples/rbac_with_domain_temporal_roles_model.conf 
b/examples/rbac_with_domain_temporal_roles_model.conf
index 93e8a3d..f21c888 100644
--- a/examples/rbac_with_domain_temporal_roles_model.conf
+++ b/examples/rbac_with_domain_temporal_roles_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, dom, obj, act
 
diff --git a/examples/rbac_with_domain_temporal_roles_policy.csv 
b/examples/rbac_with_domain_temporal_roles_policy.csv
index 3202e36..6f1e28d 100644
--- a/examples/rbac_with_domain_temporal_roles_policy.csv
+++ b/examples/rbac_with_domain_temporal_roles_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, domain1, data1, read
 p, alice, domain1, data1, write
 p, data2_admin, domain2, data2, read
diff --git a/examples/rbac_with_domains_model.conf 
b/examples/rbac_with_domains_model.conf
index 57c3721..1eead55 100644
--- a/examples/rbac_with_domains_model.conf
+++ b/examples/rbac_with_domains_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, dom, obj, act
 
diff --git a/examples/rbac_with_domains_policy.csv 
b/examples/rbac_with_domains_policy.csv
index 8558d17..5a04d9b 100644
--- a/examples/rbac_with_domains_policy.csv
+++ b/examples/rbac_with_domains_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, admin, domain1, data1, read
 p, admin, domain1, data1, write
 p, admin, domain2, data2, read
diff --git a/examples/rbac_with_hierarchy_policy.csv 
b/examples/rbac_with_hierarchy_policy.csv
index f722998..fb2b694 100644
--- a/examples/rbac_with_hierarchy_policy.csv
+++ b/examples/rbac_with_hierarchy_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, data1, read
 p, bob, data2, write
 p, data1_admin, data1, read
diff --git a/examples/rbac_with_hierarchy_policy_without_role.csv 
b/examples/rbac_with_hierarchy_policy_without_role.csv
index 7a6913d..7e4deed 100644
--- a/examples/rbac_with_hierarchy_policy_without_role.csv
+++ b/examples/rbac_with_hierarchy_policy_without_role.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, data1, read
 p, bob, data2, write
 p, data1_admin, data1, read
diff --git a/examples/rbac_with_multiple_policy_model.conf 
b/examples/rbac_with_multiple_policy_model.conf
index 6f10c97..47a84c8 100644
--- a/examples/rbac_with_multiple_policy_model.conf
+++ b/examples/rbac_with_multiple_policy_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = user, thing, action
 
diff --git a/examples/rbac_with_multiple_policy_policy.csv 
b/examples/rbac_with_multiple_policy_policy.csv
index ba9cf78..06f9e15 100644
--- a/examples/rbac_with_multiple_policy_policy.csv
+++ b/examples/rbac_with_multiple_policy_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, user, /data, GET
 p, admin, /data, POST
 
diff --git a/examples/rbac_with_not_deny_model.conf 
b/examples/rbac_with_not_deny_model.conf
index dcf03a1..412d219 100644
--- a/examples/rbac_with_not_deny_model.conf
+++ b/examples/rbac_with_not_deny_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/rbac_with_pattern_model.conf 
b/examples/rbac_with_pattern_model.conf
index 84580d9..00a4160 100644
--- a/examples/rbac_with_pattern_model.conf
+++ b/examples/rbac_with_pattern_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/rbac_with_pattern_policy.csv 
b/examples/rbac_with_pattern_policy.csv
index a7a9b7f..8b7ffb3 100644
--- a/examples/rbac_with_pattern_policy.csv
+++ b/examples/rbac_with_pattern_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, /pen/1, GET
 p, alice, /pen2/1, GET
 p, book_admin, book_group, GET
diff --git a/examples/rbac_with_pattern_regex_policy.csv 
b/examples/rbac_with_pattern_regex_policy.csv
index caf0b69..92ccdce 100644
--- a/examples/rbac_with_pattern_regex_policy.csv
+++ b/examples/rbac_with_pattern_regex_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, employee, data1, read
 p, admin, data1, read
 p, admin, data1, write
diff --git a/examples/rbac_with_resource_roles_and_domain_model.conf 
b/examples/rbac_with_resource_roles_and_domain_model.conf
index b7c8504..099115b 100644
--- a/examples/rbac_with_resource_roles_and_domain_model.conf
+++ b/examples/rbac_with_resource_roles_and_domain_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, dom, obj, act
 
diff --git a/examples/rbac_with_resource_roles_and_domain_policy.csv 
b/examples/rbac_with_resource_roles_and_domain_policy.csv
index 45ca7f2..659fc07 100644
--- a/examples/rbac_with_resource_roles_and_domain_policy.csv
+++ b/examples/rbac_with_resource_roles_and_domain_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, data_group_admin, domain1, data_group, read
 p, data_group_admin, domain1, data_group, write
 p, data_group_admin, domain2, data_group2, read
diff --git a/examples/rbac_with_resource_roles_model.conf 
b/examples/rbac_with_resource_roles_model.conf
index 845bc6c..6b5efa8 100644
--- a/examples/rbac_with_resource_roles_model.conf
+++ b/examples/rbac_with_resource_roles_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/rbac_with_resource_roles_policy.csv 
b/examples/rbac_with_resource_roles_policy.csv
index 8890847..3f262cd 100644
--- a/examples/rbac_with_resource_roles_policy.csv
+++ b/examples/rbac_with_resource_roles_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, data1, read
 p, bob, data2, write
 p, data_group_admin, data_group, write
diff --git a/examples/rbac_with_temporal_roles_model.conf 
b/examples/rbac_with_temporal_roles_model.conf
index 86dad18..1874f97 100644
--- a/examples/rbac_with_temporal_roles_model.conf
+++ b/examples/rbac_with_temporal_roles_model.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, obj, act
 
diff --git a/examples/rbac_with_temporal_roles_policy.csv 
b/examples/rbac_with_temporal_roles_policy.csv
index 42c1aaf..c6d91c0 100644
--- a/examples/rbac_with_temporal_roles_policy.csv
+++ b/examples/rbac_with_temporal_roles_policy.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, alice, data1, read
 p, alice, data1, write
 p, data2_admin, data2, read
diff --git a/examples/subject_priority_model_with_domain.conf 
b/examples/subject_priority_model_with_domain.conf
index ae11b07..0b6d319 100644
--- a/examples/subject_priority_model_with_domain.conf
+++ b/examples/subject_priority_model_with_domain.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 [request_definition]
 r = sub, dom, obj, act
 
diff --git a/examples/subject_priority_policy_with_domain.csv 
b/examples/subject_priority_policy_with_domain.csv
index d56952c..7c32af7 100644
--- a/examples/subject_priority_policy_with_domain.csv
+++ b/examples/subject_priority_policy_with_domain.csv
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 p, admin, domain1, data1, write, deny
 p, alice, domain1, data1, write, allow
 p, admin, domain2, data2, write, deny
diff --git a/maven-settings.xml b/maven-settings.xml
index 9600d94..5c14aa3 100644
--- a/maven-settings.xml
+++ b/maven-settings.xml
@@ -1,3 +1,22 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+    https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
 <settings>
     <servers>
         <server>
diff --git a/pom.xml b/pom.xml
index 334b97b..f8db737 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,10 +1,29 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+    https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
 <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.casbin</groupId>
     <artifactId>jcasbin</artifactId>
-    <version>0.0.0-SNAPSHOT</version>
+    <version>1.100.0</version>
 
     <name>JCasbin Authorization Library</name>
     <description>An authorization library that supports access control models 
like ACL, RBAC, ABAC in Java</description>
@@ -47,7 +66,46 @@
     </properties>
 
     <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>${project.basedir}</directory>
+                <targetPath>META-INF</targetPath>
+                <includes>
+                    <include>LICENSE</include>
+                    <include>NOTICE</include>
+                    <include>DISCLAIMER</include>
+                </includes>
+            </resource>
+        </resources>
         <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>3.4.0</version>
+                <executions>
+                    <execution>
+                        <id>javadoc-legal-files</id>
+                        <phase>prepare-package</phase>
+                        <goals><goal>copy-resources</goal></goals>
+                        <configuration>
+                            
<outputDirectory>${project.build.directory}/reports/apidocs/META-INF</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>${project.basedir}</directory>
+                                    <includes>
+                                        <include>LICENSE</include>
+                                        <include>NOTICE</include>
+                                        <include>DISCLAIMER</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-gpg-plugin</artifactId>
@@ -75,7 +133,7 @@
                 <artifactId>maven-javadoc-plugin</artifactId>
                 <version>3.11.1</version>
                 <configuration>
-                    <source>11</source>
+                    <source>8</source>
                     <detectJavaApiLink>false</detectJavaApiLink>
                     <!-- Turn off Java 8 strict Javadoc checking -->
 <!--                    <additionalparam>-Xdoclint:none</additionalparam>-->
@@ -110,6 +168,7 @@
                 <!-- Include zipped source code in releases -->
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-source-plugin</artifactId>
+                <version>3.4.0</version>
                 <executions>
                     <execution>
                         <id>attach-sources</id>
@@ -135,6 +194,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.15.0</version>
                 <configuration>
                     <source>1.8</source>
                     <target>1.8</target>
diff --git a/src/test/java/org/casbin/jcasbin/main/FrontendUnitTest.java 
b/src/test/java/org/casbin/jcasbin/main/FrontendUnitTest.java
index 93a4605..bb513e3 100644
--- a/src/test/java/org/casbin/jcasbin/main/FrontendUnitTest.java
+++ b/src/test/java/org/casbin/jcasbin/main/FrontendUnitTest.java
@@ -32,10 +32,10 @@ public class FrontendUnitTest {
   public void testCasbinJsGetPermissionForUser() throws IOException {
     SyncedEnforcer e = new SyncedEnforcer("examples/rbac_model.conf", 
"examples/rbac_with_hierarchy_policy.csv");
     HashMap<String, Object> received = new 
Gson().fromJson(Frontend.casbinJsGetPermissionForUser(e, "alice"), 
HashMap.class);
-    String expectedModelStr = new 
String(Files.readAllBytes(Paths.get("examples/rbac_model.conf")));
+    String expectedModelStr = 
readFixtureWithoutComments("examples/rbac_model.conf");
     assertEquals(received.get("m"), expectedModelStr);
 
-    String expectedPolicyStr = new 
String(Files.readAllBytes(Paths.get("examples/rbac_with_hierarchy_policy.csv")));
+    String expectedPolicyStr = 
readFixtureWithoutComments("examples/rbac_with_hierarchy_policy.csv");
     expectedPolicyStr = 
Pattern.compile("\n+").matcher(expectedPolicyStr).replaceAll("\n");
     String[] expectedPolicyItem = expectedPolicyStr.split(",|\n");
     int i = 0;
@@ -52,4 +52,10 @@ public class FrontendUnitTest {
       }
     }
   }
+
+  // Model and policy export contains definitions, not file license comments.
+  private String readFixtureWithoutComments(String path) throws IOException {
+    String text = new String(Files.readAllBytes(Paths.get(path)), 
java.nio.charset.StandardCharsets.UTF_8);
+    return text.replaceAll("(?m)^#.*(?:\\r?\\n|$)", 
"").replaceFirst("^\\s*\\r?\\n", "");
+  }
 }
diff --git 
a/src/test/java/org/casbin/jcasbin/main/InternalEnforcerWithDispatcherTest.java 
b/src/test/java/org/casbin/jcasbin/main/InternalEnforcerWithDispatcherTest.java
index 24d47ad..13e4315 100644
--- 
a/src/test/java/org/casbin/jcasbin/main/InternalEnforcerWithDispatcherTest.java
+++ 
b/src/test/java/org/casbin/jcasbin/main/InternalEnforcerWithDispatcherTest.java
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//     https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
 package org.casbin.jcasbin.main;
 
 import org.casbin.jcasbin.persist.Dispatcher;
diff --git a/src/test/java/org/casbin/jcasbin/main/TestAviatorValidation.java 
b/src/test/java/org/casbin/jcasbin/main/TestAviatorValidation.java
index 838deb2..d39c5b1 100644
--- a/src/test/java/org/casbin/jcasbin/main/TestAviatorValidation.java
+++ b/src/test/java/org/casbin/jcasbin/main/TestAviatorValidation.java
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//     https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
 import org.casbin.jcasbin.util.ExpressionValidator;
 
 public class TestAviatorValidation {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to