Age | Commit message (Collapse) | Author | Files | Lines |
|
Fix spelling error and add code cover >95% for the
XacmlPolicyUtils.
Issue-ID: POLICY-2242
Change-Id: I21f239e6bd42073ff84883d04f2b8bee1466b8e0
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
From under 50% to over 90%.
Issue-ID: POLICY-2242
Change-Id: Ie061bddbdd2fcdb37bed608847449e5bc92173b5
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Throw exceptions when requests cannot be created and return
error information back. Consolidated some code to avoid sonar
duplication issues.
Companion review to https://gerrit.onap.org/r/c/policy/models/+/103548
Issue-ID: POLICY-2242
Change-Id: Ic873af933dab82e3aeef6335f55939666be20385
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
|
|
Issue-ID: POLICY-2182
Change-Id: I13246e08afdc2f5a380b5737c72851f271211d46
Signed-off-by: Chenfei Gao <cgao@research.att.com>
|
|
Removed duplicate code from operations history classes.
added code coverage to other classes.
cleared sonar in main for args
Issue-ID: POLICY-2242
Change-Id: Ief548c96a180c132a3f17681d9cbc018c62e42ac
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Added a new native application to the service loader framework
Added a new translator for the native application
Added custom serialization providers for xacml+json and xacml+xml
Added a new endpoint for native xacml decision api
Added a new api provider function to handle the native xacml api calls
Added corresponding junit tests
Issue-ID: POLICY-2182
Change-Id: I30fa4637612c324d543f9952386cf1a27a52d76c
Signed-off-by: Chenfei Gao <cgao@research.att.com>
|
|
Just clears a warning from main JUnit tests.
Issue-ID: POLICY-1740
Change-Id: Ie9e5bb0463bf5827085a714a61a5d87021f37860
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Issue-ID: POLICY-2355
Change-Id: I2933cf17fa790113eaaf8b9adc199c3b8fdc0e75
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
|
|
Issue-ID: POLICY-1596
Change-Id: I00164ea17eb9d547b45c01e5f46f7aaf0f9a25e2
Signed-off-by: HOCKLA <ah999m@att.com>
|
|
Issue-ID: POLICY-2230
Change-Id: I363dc450b6d7aaf13696c50792cbea5a8d643413
Signed-off-by: HOCKLA <ah999m@att.com>
|
|
Adding support for a preliminary request to pull subscriber details.
The returned decision adds scope attributes for the original request.
Fixed some checkstyle issues due to new checkstyle requirements.
Issue-ID: POLICY-2066
Change-Id: Ief02d896ce33e4864bb20e9185b0d0f5eb254bfd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Requires changes to StdMatchableTranslator to go deeper when
searching for matchable attributes.
NOTE: will re-visit the StdMatchableTranslator at a later date
in order to support more robust Policy Types. And document best
practices for defining matchables.
Issue-ID: POLICY-1740
Change-Id: I291cf1c2e6eba0a677a3312dd11f0e56178a805b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Missing assertions in JUnit test cases.
Use replace vs replaceAll
Swapping arguments
Issue-ID: POLICY-2079
Change-Id: I5accd462eab3d4f6b3321e375d4ba1084caf4b8c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Ignore the pdp group specified in the PdpUpdate message.
Updated junits and test resources.
Issue-ID: POLICY-2229
Change-Id: I0c7a33c45424cef6440b0837e1dd22a7487c5d44
Signed-off-by: HOCKLA <ah999m@att.com>
|
|
Issue-ID: POLICY-2175
Change-Id: I32d2fe78846f58d6e700100dd523732817f1f04d
Signed-off-by: Ali Hockla <ah999m@att.com>
|
|
Removed the rest server start/stop from the Activator because the engine
starts in PASSIVE state.
Added code to start/stop the rest server when a pdp state change occurs.
Issue-ID: POLICY-2154
Change-Id: Iec6fcc990dc3dde702a911eb4f90d29e25c395a2
Signed-off-by: Ali Hockla <ah999m@att.com>
|
|
* StdBaseTranslator added helpful support methods and
can now add obligations to either rule, policy or policy sets.
* StdMatchablePolicyRequest improved to support optional
policy-type as part of the request to refine the output results.
* Added more tests to ensure that the decision is returning the
appropriate results.
* Added more Javadoc for code.
* Added some sonar fix for either log or throw exception.
Issue-ID: POLICY-2066
Change-Id: I90d6d90c2cdbb627e96cfce1d2632b2439a1e477
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
There is duplicate code for some common translation of policy
decision responses and for scanning obligations.
Removed some TODO items (left others because I want to look
at them more closely).
Stored System.lineSeparator into a static var so that I can
remove some unnecessary ifs. There's still one left that I
am not worried about.
Gson as a static variable.
Issue-ID: POLICY-2066
Change-Id: I9c8162d5ad1c5f884be347dd94631fa74ca76f85
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Now that yaml is supported, use those policies that are
stored in the models-examples that are preloaded into the
api.
Fixed a minor checkstyle issue. Not sure why it was missed.
Issue-ID: POLICY-2066
Change-Id: I2f4384a310bfa818555de5dacb477daf82fac6de
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
decision results
Issue-ID: POLICY-2126
Change-Id: I18d50a8746ede792ec9507ab98125383c5914ba1
Signed-off-by: HOCKLA <ah999m@att.com>
|
|
Either log or re-throw exception
Refactor to not nest more than 3 statements
Refactor to throw at most one exception
Move variable to comply with Java Code conventions
String literal on LHS
Issue-ID: POLICY-2079
Change-Id: Iac33623ef4694cf38c4a69c8f0b9040d8439998e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Issue-ID: POLICY-2090
Change-Id: Id688e305f878f56e374e6bd9047d9d6c75fbe0c6
Signed-off-by: Ali Hockla <ah999m@att.com>
|
|
Upgrade to models fix for derivedFrom() append of 0.0.0
And some sonar fixes for:
Exceptions should be either logged or rethrown but not both
Preconditions" and logging arguments should not require evaluation
Reduced cognitive complexity
Issue-ID: POLICY-2079
Change-Id: Ied8630020e8a737c33b1484db953df133c89398f
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Also modified code to use StandardYamlCoder.
Change-Id: I0596c8b054339ac68ef8c4250cd25b9ff88d47e4
Issue-ID: POLICY-2085
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Change-Id: I6ca46b3bbc9529c6fef5a332b224a4de69e3cdef
Issue-ID: POLICY-2045
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Utilize's Jim's helper class to pull from API policy types
definitions so that Xacml PDP can determine which properties
are "matchable".
Override initialize to set translator parameters.
Utilize the metadata section of ToscaProperties to store
the matchable field.
Updated Matchable Request to be dynamic with respect to the
incoming resource attributes.
Stored the policy types as JSON.
Issue-ID: POLICY-1899
Change-Id: Icff3605495b0a34ebfcdfa54346095ce2d8468a4
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Added a class to retrieve a policy type from the policy-api.
Updated property files to include parameters that are needed
to configure it.
Updates per review comments:
- change PolicyApi to PolicyApiCaller
- use HttpClientFactory
- removed superfluous constructors from exception classes
- changed parameters to use RestServerParameters instead of BusTopicParams
Change-Id: I8aad6ca5a733c8ad9cc983496e745ebe7400dd17
Issue-ID: POLICY-1911
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Modified junit parameters to specify "noop" instead of "dmaap"
in the topic properties, eliminating the dmaap error messages
from the log.
Change-Id: I350d988d10219e6ded2c011a4ed117fd5e71876a
Issue-ID: POLICY-1725
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Issue-ID: POLICY-1988
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I544a0bdf63582cdff74765d7fad1b7f993d0bfa0
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
|
|
Change-Id: I2770d2803c79b5eb72b69bb6aa4a1da43a0f6a0b
Issue-ID: POLICY-1965
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Replaced ParameterUtils with the use of the new
addTopic(TopicParameterGroup) method.
Change-Id: I35bf8a78d4670835dda005cdb218665a3bf48a16
Issue-ID: POLICY-1953
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Apparently, TimerTasks may not be cancelled and then re-scheduled.
Modified the code to use a scheduled thread pool instead.
Change-Id: I2e26a5a37636f570f362481823a0274fe558e2e9
Issue-ID: POLICY-1939
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Change-Id: I9b59dcd27705e40c424b6a76420e0395adbe44bb
Issue-ID: POLICY-1772
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Change-Id: I331483e2e28f2c57160b3eaace40fc84a1c13727
Issue-ID: POLICY-1652
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Fixed breakages due to changes made in policy/common to satisfy
sonar.
Change-Id: I6c655ca9509bc1d52277d55b02103e9875de2c29
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Change-Id: I3be6248db65041f5d9b7acfcf0fcd2f49d9d70f8
Issue-ID: POLICY-1744
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
|
|
Changing ToStringTester from utils to utils-test.
Bumping the policy/common & policy/models version.
Change-Id: Idf665bc92345c445f483ebfb190d39c7019280aa
Issue-ID: POLICY-1746
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
|
|
Released 2.1.0
Issue-ID: POLICY-1737
Change-Id: Ieb3015e9373a9a71a71f2811cbc6db9315d58109
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Modified the code to set the policy count statistic at start-up
and whenever the policy list is changed.
Also fixed a couple of checkstyle issues in guard.
Change-Id: I92017fe64cd5d19c36908347193cc21d183f051e
Issue-ID: POLICY-1844
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Per javadocs, getName() should generally be used instead of
Class.getCanonicalName(). This change only applies to classes; it
does not apply to File objects.
Change-Id: Id9ad514a7ba10e7cdbf292bba2b07135bdbd2572
Issue-ID: POLICY-1646
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Change-Id: I231fa4c077db75d426278f6f718876bb2c76a8db
Issue-ID: POLICY-1747
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Released 2.0.1
Issue-ID: POLICY-1700
Change-Id: Idc1d8602b276c9ad3199c57723dd053fb1dd48a3
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Released so bumping to next patch
Issue-ID: POLICY-1630
Change-Id: Ib91063848e1a757b0a251052ce8ec61dace85d88
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Added new generated request id when sending terminate message
changed to send clone of PdpStatus
Change-Id: Ia60469c8a62d3c2eff63fd592984cade4760b2bc
Issue-ID: POLICY-1645
Signed-off-by: Michael Mokry <michael.mokry@att.com>
|
|
Fixed checkstyle issues
Made changes to include PdpGroup and PdpSubGroup in termination message
Change-Id: I772404adbbe9be18001554616eb0c935317bdaba
Issue-ID: POLICY-1645
Signed-off-by: Michael Mokry <michael.mokry@att.com>
|
|
Refactored xacml-pdp to eliminate a number of static fields.
Modified junit tests to allocate new ports for each test.
Also modified XacmlPolicyUtilsTest to convert path names to match
the file system so that the junit will work in OSs other than
linux.
Replaced logback.xml with a copy of the one from PAP to resolve
some issues.
Don't print entire message when discarding, as each PDP receives
messages for ALL PDPs.
Remove shutdown class from Main - just invoke this.shutdown()
directly.
Added additional comments to CommonRest. Also modified port test
parameters.
Change-Id: Id8bf7216cdcb59a1a2cb4cb957fa44f640315cfe
Issue-ID: POLICY-1645
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
1. Added a null check against XacmlPdpActivator.getCurrent() method to
fix the following exception
Exception in thread "Timer-0" java.lang.NullPointerException
Change-Id: Ia6c7efc2bd317dd52e9e89dd4f9f59d9d66d0857
Issue-ID: POLICY-1703
Signed-off-by: Michael Mokry <michael.mokry@att.com>
|
|
1. Added appliesTo() check to state change and PDP update listeners.
2. Made changes to record the extracted pdpUpdate values.
3. Removed pdpState instance variable from heartbeat publisher
4. Split XacmlPdpMessage.updateInternalStatus() into two methods to handle
PdpStateChange and PdpUpdate messages separately
5. Cleaned up unused imports
Change-Id: I76c68d925e46d475c086bd5b86851ea44d821b28
Issue-ID: POLICY-1673
Signed-off-by: Michael Mokry <michael.mokry@att.com>
|
|
* Adding in the statistics for decisions and errors.
* Cleaned up sonar issues and added code coverage.
* Sped up JUnit tests
* Fix JUnit issues with not finding application path
* Fix TestDecision not finding persistence.xml
* Fix for lingering statistics from previous runs. That
needs to be addressed at a later time.
* Changed persistence to use properties for configuration
of database rather than hard coding the persistence.xml
* Fix for Josh's comment to use else-if
* Changed to use apache Pair
* Added blacklist guard policy
Issue-ID: POLICY-1440
Change-Id: I56af8c3dcc82463f7381f1eaea7f1440b76200bd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|