nordic-institute / misp2 Goto Github PK
View Code? Open in Web Editor NEWMISP2 is a web application that provides an easy way to query data over X-Road.
License: MIT License
MISP2 is a web application that provides an easy way to query data over X-Road.
License: MIT License
Command 'netstat' (from package 'net-tools') is used in the script '/usr/xtee/app/configure_admin_interface_ip.sh' to find the ip address of admin's SSH session.
Since Ubuntu >= 18.04 the package 'net-tools' is declared obsolete and isn't installed by default.
Solution: use command 'ss' from package 'iproute2' which is installed by default.
Upgrade of the package xtee-misp2-postgresql from 2.6.3 to 2.6.4 ends with an error:
Setting up xtee-misp2-postgresql (2.6.4) ...
You have package shema version 2.6.4
PostgreSQL service is running.
Using DB connection parameters from configuration file /var/lib/tomcat8/webapps/misp2/WEB-INF/classes/config.cfg.
Allowing 'postgres' user locally trusted access.
true
Creating database 'misp2db'
createdb: database creation failed: ERROR: database "misp2db" already exists
Cannot create database 'misp2db'
You can try to create "misp2db" by yourself:
/usr/lib/postgresql/10/bin/createdb -p 5432 misp2db -U postgres -E UNICODE
dpkg: error processing package xtee-misp2-postgresql (--configure):
installed xtee-misp2-postgresql package post-installation script subprocess returned error exit status 1
OS: Ubuntu 18.04.6 LTS
I have a REST service and I try to call it using the latest MISP2 (I'm using the Docker version found in docker-dev).
My OpenAPI based service has defined some optional query paramters like this:
- in: query
name: myParam
description: myParam
required: false
schema:
type: string
I have generated a form in Misp2 and I can fill in the value of "myParam"
However when I submit the form all the values (that had in:query in the yaml) are lost by MISP2.
It seems this code lacks copying over the query params:
https://github.com/nordic-institute/misp2/blob/develop/web-app/src/main/java/ee/aktors/misp2/action/RestMediatorAction.java#L235-L289
How to test:
As you can see from the yaml it has a query parameter "name":
paths:
/pets:
get:
tags:
- pet
summary: Get pets from store
description: Search pets
operationId: getPets
parameters:
- name: name
in: query
description: Pet name search
required: false
schema:
type: string
I have a REST search service with optional header parameter of type enum:
- in: header
name: personType
description: Filter by person type
required: false
schema:
type: string
enum: [INDIVIDUAL, LEGAL_ENTITY]
MISP2 generates the following SELECTbox out of this:
<div class="field">
<label>Filter by person type</label>
<select name="personType" data-rf-param-location="header">
<option value="INDIVIDUAL">INDIVIDUAL</option>
<option value="LEGAL_ENTITY">LEGAL_ENTITY</option>
</select>
</div>
But Misp2 doesn't add empty option to the front (for the case if I don't want to specify anything).
The required behaviour would be that since the element is declared as required=false there should be an additional option tag in the front:
<div class="field">
<label>Filter by person type</label>
<select name="personType" data-rf-param-location="header">
<option value="">--</option>
<option value="INDIVIDUAL">INDIVIDUAL</option>
<option value="LEGAL_ENTITY">LEGAL_ENTITY</option>
</select>
</div>
I have a REST web service with date-time header parameter:
- in: header
name: If-Modified-Since
schema:
type: string
format: date-time
example: 2022-10-18T17:32:28+02:00
required: false
MISP2 UI renders a nice datepicker and a checkbox to enter time:
I set date to "14.11.2022" and time to "16:52" submit the form this what is show in the logs:
This is what is logged and sent out to the service:
Headers :
if-modified-since: 11/14/2022
Expected behaviour would be that date would be in correct format (yyyy-mm-dd) and time would be appended to it like this:
Headers :
if-modified-since: 2022-11-14T16:52:00+02:00
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.