Skip to content

Instantly share code, notes, and snippets.

View rnavagamuwa's full-sized avatar
🎯
Focusing

Randika Navagamuwa rnavagamuwa

🎯
Focusing
View GitHub Profile
<sequence xmlns="http://ws.apache.org/ns/synapse" name="custom_validation">
<log description="validation_flow_initiated_log" level="custom">
<property name="validation_flow_initiated_log" value="Custom valiation initiated" />
</log>
<payloadFactory description="sample_submission_payload" media-type="json">
<format>{"scope":"$1","service":"$2"}</format>
<args>
<arg evaluator="xml" expression="$ctx:Scopes" />
<arg evaluator="xml" expression="get-property('transport','service')" />
</args>
input {
beats {
type => "beats"
host => "127.0.0.1"
port => 5044
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
@Configuration
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class MethodSecurityConfig extends GlobalMethodSecurityConfiguration {
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
DefaultMethodSecurityExpressionHandler expressionHandler =
new DefaultMethodSecurityExpressionHandler();
expressionHandler.setPermissionEvaluator(new AttributeEvaluator());
xacml.pdp.url.entitlement.service=https://localhost:9443/api/identity/entitlement/decision
xacml.pdp.trustStore=truststore
xacml.pdp.trustStore.password=password
xacml.pdp.keyStore=keystore
xacml.pdp.keyStore.password=password
{
"admin_xacml": {
"Request": {
"Action": {
"Attribute": [
{
"AttributeId": "urn:oasis:names:tc:xacml:1.0:action:action-id",
"Value": "${actionid}"
}
]
[{"tweet":"fun"},{"tweet":"sample https://www.youtube.com/watch?v=-aFfqoxerjA"},{"tweet":"The full power of the amazing #AWS #Serverless platform at your fingertips with the #slappforge #sigma cloud IDE for serverless computing https://lnkd.in/frUWreb "}]
let AWS = require('aws-sdk');
let connectionManager = require('./ConnectionManager');
let SL = require('@slappforge/slappforge-sdk');
const rds = new SL.AWS.RDS(connectionManager);
exports.handler = function (event, context, callback) {
let successfullyLoggedIn = false;
// Replace the query with the actual query
// You can pass the existing connection to this function.
// A new connection will be created if it's not present as the third param
let AWS = require('aws-sdk');
let connectionManager = require('./ConnectionManager');
let SL = require('@slappforge/slappforge-sdk');
const rds = new SL.AWS.RDS(connectionManager);
exports.handler = function (event, context, callback) {
let response;
// Replace the query with the actual query
// You can pass the existing connection to this function.
// A new connection will be created if it's not present as the third param
{
"name": "simple-authenticator",
"version": "1.0.0",
"dependencies": {
"aws-sdk": "2.176.0",
"@slappforge/slappforge-sdk": "0.0.3"
}
}
let AWS = require('aws-sdk');
let connectionManager = require('./ConnectionManager');
let SL = require('@slappforge/slappforge-sdk');
const rds = new SL.AWS.RDS(connectionManager);
exports.handler = function (event, context, callback) {
let response;
let inserts = [event.email, event.password, event.lastName, event.firstName, event.address];
// Replace the query with the actual query
// You can pass the existing connection to this function.