How to configure a write only layer on Geoserver? - security

This is probably a wrong way of doing it, but I was exploring this option only because I do not know how to implement the right solution.
We have a layer to which features are added using WFS-T. We have configured Geoserver to authenticate and authorize via LDAP.
While querying for features, we would like Geoserver to return features based on the user/role.
Since I do not know how to set feature based security (row level security), my thought was to see if we can make the layer write only and not allow any read operation.
The read will be done through a SQL Parametric View layer will add a WHERE cause to filter by an unique value.
For doing that, I have this setting in layers.properties workspace.layer.w=ROLE_USER workspace.layer.r=SUPERUSER
However this doesn’t seem to work and I am not able to do any WFS-T on the layer although this user has the correct role. Reading s
What would be the right strategy to implement this? Thanks in advance.

I didn't try it myself, but if you are using one of the latest version of geoserver you should be able to use geofence plugin from geosolutions.
AFAIK you can configure cql filters on the layer to limit the set of rows returned to the user based on the user autorization.

Related

IBM Maximo - Is there a way to get possible work order status transitions via API

We are building a work order management integration layer on top of the base Maximo, communicating via provided REST/OSLC API, but we are stuck when it comes to finding all possible statuses a work order could transition to for a given work order.
Is there a REST/OSLC API, or some way to expose it externally (ex. some kind of one-time config export), the possible status transitions for a given work order?
This should consider all the customizations we've made to Maximo including additional statuses, extra conditions, etc. We are targeting version 7.6.1.
IBM seems to have dropped some things from the new NextGen REST/JSON API documentation. There is almost no mention of the "getlist" action anymore, something I have really enjoyed using for domain controlled fields. This should give you exactly what you are looking for, a list of the possible statuses that a given work order could go into. I was unable to verify this call today, but I remember it working as desired when I last used it (many months ago).
<hostname>/maximo/oslc/os/mxwo/<href_value_of_a_specific_wo>?action=getlist&attribute=status
The method you're looking for is psdi.mbo.StatefulMbo.getValidStatusList
See details here:
https://developer.ibm.com/assetmanagement/7609-maximo-javadoc/
Now, you want to expose the result to a REST API. You could create an automation script that given the WONUM would return the allowed status list. You can leverage the new REST API to achieve that quite easily.
See how you can call an automation script with a REST call here:
https://developer.ibm.com/static/site-id/155/maximodev/restguide/Maximo_Nextgen_REST_API.html#_automation_scripts
Last part: you will need to create a request response based on the mboset returned from getValidStatusList.

Capture the name of the previous processor in NiFi

I'm looking to create an Error Handling Flow, and need to capture the name of the failing processor on particular points only. An Update Attribute would be last resort as it would clutter up the templates. Ideally I'm looking for a script or similar, but I'm open to suggestions from NiFi experts.
You can use the Data Provenance feature for this via manual inspection or REST API, but by design ("Flow Based Programming"), components in Apache NiFi are black boxes independent and unaware of their predecessors and successors.
If you need a programmatic capability to access the error messages, look at SiteToSiteBulletinReportingTask. With this component, you can send the bulletins back to the same (or a different) NiFi instance via Site-to-Site and ingest and process them as any other arbitrary data.

How to reuse existing models in LUIS

Since I cannot modify builtin models (entities, intents..) as provided by the LUIS.ai, How can I import them into my own model in a way that I can modify them further specific to my scenario(s).
Some of the contextual information can be found here: https://github.com/Microsoft/BotBuilder/issues/1694#issuecomment-305531910
I am using Azure Bot Service with Node.js
If you are using the new prebuilt domains, once you add them to your model, you should be able to tweak them.
If you are using the Cortana prebuilt app, I don't think you will be able to update it; however, the documentation contains some information if you want to "mimic" it.
If you explain exactly what are your scenarios, we might be able to come up with other alternatives.
I can't think of a straight-forward way to go about doing this, but you could take the .csv logs from LUIS and incorporate it into your model; at the least the response column data is in json format.

Drupal - Counting data in nodes, creating custom statistics

I'm building some custom content types to capture customer data on a website. Admins will enter the data, users will be able to view it, but I also need to be able to bolt on some statistics and infographics to the data.
The problem I have is that I can't see any simple way of doing this within Drupal. Are there modules which can produce simple stats on selected node types or will I have to write a complete custom module using the data abstraction layer?
Thanks for any insights!
Yeah turns out if you want truly custom stats then the simplest thing is to build whatever you need in PHP using the data abstraction layer.
Plug into the DB via Drupal and do whatever you need to do...

How can I configure AOP in Liferay Service Builder?

I want to to intercept a method in Service Builder, for example: XXXLocalService.update(). But I don't know the correct way to do this. I have done some research but I haven't found a clear way to do this.
Any help will be greatly appreciated.
There are basically two ways to achieve this in Liferay, assuming you want to intercept Liferay's services:
Service Wrapper Hooks
What this does is gives you a wrapper around the desired service, for eg: UserLocalServiceWrapper would be a wrapper around UserLocalService and would have complete control over the methods defined in this interface. And this is a good approach if you know the exact method you want to modify/intercept in that particular service.
Also with this approach you have full control whether the original method should run or not.
The link provides the full detailed tutorial how to achieve this.
Model Listener Hooks
This hook should be used when you want to track any changes on the particular Model like in the above case User and this is helpful when you are not sure which method is going to update the model.
What this basically does is gives you a set of methods like onBeforeUpdate, onAfterUpdate, onAfterCreate etc to have control over the model.
Also this approach would work good enough for your custom services as well.

Resources