mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-15 11:07:57 +01:00
Merge branch 'develop' into feature/springboot
This commit is contained in:
commit
bd71fc3f41
@ -96,5 +96,5 @@ After credential was created, Google will show you the clientId and clientSecret
|
|||||||
## License
|
## License
|
||||||
|
|
||||||
The source code is Licensed under the WiseMapping Open License, Version 1.0 (the “License”);
|
The source code is Licensed under the WiseMapping Open License, Version 1.0 (the “License”);
|
||||||
You may obtain a copy of the License at: [https://wisemapping.atlassian.net/wiki/display/WS/License]
|
You may obtain a copy of the License at: [https://bitbucket.org/wisemapping/wisemapping-open-source/src/develop/license.md](https://bitbucket.org/wisemapping/wisemapping-open-source/src/develop/license.md)
|
||||||
|
|
||||||
|
45
config/README.md
Normal file
45
config/README.md
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Database Configuration
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
WiseMapping supports a wide variety of databases. However, we run intensively tests over HSQL and MySQL database.
|
||||||
|
|
||||||
|
* HyperSQL: Automatically configured when you compile WiseMapping and It's used primarily for testing. Additionally, the binary distribution already has an instance configured to provide a single click installation.
|
||||||
|
* MySQL: This version is the most tested database we support. MySQL is the database use in http://www.wisemapping.com and it's the suggested version for production environments.
|
||||||
|
* PostgreSQL: Scripts are distributed for the creation and configuration of the it. You will find them within "config/postgres" directory in the binary distribution. Additionally, JDBC driver need to be added to the container.
|
||||||
|
* Others: In spite of the fact that we don't provide yet initialization scripts for others databases, WiseMapping can be deployed in any relational database. Please, contact us if you have any particular question on this area.
|
||||||
|
|
||||||
|
* In the following section, you are going to find a detailed explanation how to configure you WiseMapping using MySQL 5.5.
|
||||||
|
|
||||||
|
## MySQL Installation
|
||||||
|
### Prerequisites
|
||||||
|
* Download and install MySQL. You can download it for free from: http://dev.mysql.com/downloads/
|
||||||
|
Running SQL Scripts
|
||||||
|
Inside the WiseMapping binary distribution, you will find a directory "config/mysql". It contains all the SQL script required to configure a new WiseMapping database instance.
|
||||||
|
|
||||||
|
You will find 4 scripts:
|
||||||
|
* create-database.sql: Create all wisemapping database and wisemapping user.
|
||||||
|
* create-schemas.sql: Create all database tables and index.
|
||||||
|
* apopulate-schemas.sql: Creates a mind map example and an a test user "test@wisemapping.org" with password "test".
|
||||||
|
* drop-schemas.sql: Drop all wisemapping tables in case you want to have a fresh installation.
|
||||||
|
|
||||||
|
There are a lot of good tools you can use to run this scripts (eg: MySQLWorkbench). However, the simples way is to use the command line tool that is distributed as part of the MySQL installation.
|
||||||
|
If you are one brave hearts that is not afraid of the command line tools, open a terminar and execute the following lines:
|
||||||
|
~~~~
|
||||||
|
cd <WISEMAPPING-DIR>/config/database/mysql
|
||||||
|
# Default MySQL installation creates a "root" user with empty password. You can connect to the database with this user if you are # logged in same machine where the database is installed and must be executed logged as "root"
|
||||||
|
#
|
||||||
|
# If you have changed the default database "root" password , you need to specify an additional -p parameter and provide the
|
||||||
|
# new password.
|
||||||
|
mysql -uroot < create-database.sql
|
||||||
|
|
||||||
|
# Create tables and default tests user
|
||||||
|
mysql -uwisemapping -Dwisemapping -ppassword < create-schemas.sql
|
||||||
|
mysql -uwisemapping -Dwisemapping -ppassword < apopulate-schemas.sql
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Great, you have configured you database !. Let's configure WiseMapping now.
|
||||||
|
|
15
license.md
Normal file
15
license.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# WiseMapping Public License Version 1.0 (WPL)
|
||||||
|
|
||||||
|
WiseMapping open source edition is licensed under the WiseMapping Public License Version 1.0. It is basically Apache License Version 2.0 plus the "powered by wisemapping" text requirement on every single page (the "License") unless we authorize you to remove it.
|
||||||
|
The WiseMapping Public License Version 1.0 ("WPL") consists of the [APACHE LICENSE, VERSION 2.0](http://www.apache.org/licenses/LICENSE-2.0), modified to be specific to WiseMapping, with the Additional Terms in Exhibit B.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## EXHIBIT B - WiseMapping Public License.
|
||||||
|
Additional Terms applicable to the WiseMapping Public License.
|
||||||
|
I. Effect.
|
||||||
|
These additional terms described in this wiseMapping Public License - Additional Terms shall apply to the Covered Code under this License.
|
||||||
|
II. WiseMapping and "powered by WiseMapping" text.
|
||||||
|
This License does not grant any rights to use the trademarks "WiseMapping" even if such marks are included in the Original Code or Modifications.
|
||||||
|
However, in addition to the other notice obligations, unless wisemapping founders authorize you by email not to do it, (1) all copies of the Original Code in Executable and Source Code form must, as a form of attribution of the original author, include on each user interface screen (i) the "powered by WiseMapping" text; and (2) all derivative works and copies of derivative works of the Covered Code in Executable and Source Code form must include on each user interface screen (i) the "powered by WiseMapping" text. In addition, the "powered by WiseMapping" text, as appropriate, must be visible to all users, must appear in each user interface screen, and must be in the same position. When users click on the "powered by WiseMapping" text it must direct them to http://www.wisemapping.com. This obligation shall also apply to any copies or derivative works which are distributed under the alternative terms of Section 3.6 and this obligation must be included in any such license
|
15
license.txt
15
license.txt
@ -1,15 +0,0 @@
|
|||||||
Copyright [2014] [wisemapping]
|
|
||||||
|
|
||||||
Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
|
||||||
"powered by wisemapping" text requirement on every single page;
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the license at
|
|
||||||
|
|
||||||
http://www.wisemapping.org/license
|
|
||||||
|
|
||||||
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.
|
|
@ -29,11 +29,11 @@
|
|||||||
<mkdir dir="target/wisemapping-mindplot"/>
|
<mkdir dir="target/wisemapping-mindplot"/>
|
||||||
<exec executable="npm" dir="target" failonerror="true">
|
<exec executable="npm" dir="target" failonerror="true">
|
||||||
<arg value="pack"/>
|
<arg value="pack"/>
|
||||||
<arg value="@wisemapping/mindplot@5.1.1"/>
|
<arg value="@wisemapping/mindplot@5.1.2"/>
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="tar" dir="target" failonerror="true">
|
<exec executable="tar" dir="target" failonerror="true">
|
||||||
<arg value="-xvzf"/>
|
<arg value="-xvzf"/>
|
||||||
<arg value="wisemapping-mindplot-5.1.1.tgz"/>
|
<arg value="wisemapping-mindplot-5.1.2.tgz"/>
|
||||||
<arg value="-C"/>
|
<arg value="-C"/>
|
||||||
<arg value="wisemapping-mindplot"/>
|
<arg value="wisemapping-mindplot"/>
|
||||||
</exec>
|
</exec>
|
||||||
@ -42,11 +42,11 @@
|
|||||||
<mkdir dir="target/wisemapping-webapp"/>
|
<mkdir dir="target/wisemapping-webapp"/>
|
||||||
<exec executable="npm" dir="target" failonerror="true">
|
<exec executable="npm" dir="target" failonerror="true">
|
||||||
<arg value="pack"/>
|
<arg value="pack"/>
|
||||||
<arg value="@wisemapping/webapp@5.1.1"/>
|
<arg value="@wisemapping/webapp@5.1.2"/>
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="tar" dir="target" failonerror="true">
|
<exec executable="tar" dir="target" failonerror="true">
|
||||||
<arg value="-xvzf"/>
|
<arg value="-xvzf"/>
|
||||||
<arg value="wisemapping-webapp-5.1.1.tgz"/>
|
<arg value="wisemapping-webapp-5.1.2.tgz"/>
|
||||||
<arg value="-C"/>
|
<arg value="-C"/>
|
||||||
<arg value="wisemapping-webapp"/>
|
<arg value="wisemapping-webapp"/>
|
||||||
</exec>
|
</exec>
|
||||||
|
@ -34,6 +34,22 @@ public class SecurityConfig {
|
|||||||
firewall.setAllowSemicolon(true);
|
firewall.setAllowSemicolon(true);
|
||||||
return firewall;
|
return firewall;
|
||||||
}
|
}
|
||||||
|
@Bean
|
||||||
|
@Order(1)
|
||||||
|
public SecurityFilterChain embeddedDisabledXOrigin(@NotNull final HttpSecurity http, @NotNull final HandlerMappingIntrospector introspector) throws Exception {
|
||||||
|
final MvcRequestMatcher.Builder mvcMatcher = new MvcRequestMatcher.Builder(introspector).servletPath("/c");
|
||||||
|
http
|
||||||
|
.securityMatchers((matchers) ->
|
||||||
|
matchers.requestMatchers(mvcMatcher.pattern(("/maps/*/embed"))))
|
||||||
|
.authorizeHttpRequests(
|
||||||
|
(auth) -> auth.requestMatchers(mvcMatcher.pattern("/maps/*/embed")).permitAll())
|
||||||
|
.headers((header -> header.frameOptions()
|
||||||
|
.disable()
|
||||||
|
))
|
||||||
|
.csrf(AbstractHttpConfigurer::disable);
|
||||||
|
|
||||||
|
return http.build();
|
||||||
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@Order(2)
|
@Order(2)
|
||||||
@ -59,7 +75,7 @@ public class SecurityConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@Order(1)
|
@Order(3)
|
||||||
public SecurityFilterChain mvcFilterChain(@NotNull final HttpSecurity http, @NotNull final HandlerMappingIntrospector introspector) throws Exception {
|
public SecurityFilterChain mvcFilterChain(@NotNull final HttpSecurity http, @NotNull final HandlerMappingIntrospector introspector) throws Exception {
|
||||||
final AuthenticationSuccessHandler authenticationSuccessHandler = new AuthenticationSuccessHandler();
|
final AuthenticationSuccessHandler authenticationSuccessHandler = new AuthenticationSuccessHandler();
|
||||||
authenticationSuccessHandler.setAlwaysUseDefaultTargetUrl(false);
|
authenticationSuccessHandler.setAlwaysUseDefaultTargetUrl(false);
|
||||||
@ -84,7 +100,6 @@ public class SecurityConfig {
|
|||||||
|
|
||||||
.requestMatchers(mvcMatcher.pattern("/forgot-password")).permitAll()
|
.requestMatchers(mvcMatcher.pattern("/forgot-password")).permitAll()
|
||||||
.requestMatchers(mvcMatcher.pattern("/forgot-password-success")).permitAll()
|
.requestMatchers(mvcMatcher.pattern("/forgot-password-success")).permitAll()
|
||||||
.requestMatchers(mvcMatcher.pattern("/maps/*/embed")).permitAll()
|
|
||||||
.requestMatchers(mvcMatcher.pattern("/maps/*/try")).permitAll()
|
.requestMatchers(mvcMatcher.pattern("/maps/*/try")).permitAll()
|
||||||
.requestMatchers(mvcMatcher.pattern("/maps/*/public")).permitAll()
|
.requestMatchers(mvcMatcher.pattern("/maps/*/public")).permitAll()
|
||||||
.requestMatchers(restfullMapper.pattern("/maps/*/document/xml-pub")).permitAll()
|
.requestMatchers(restfullMapper.pattern("/maps/*/document/xml-pub")).permitAll()
|
||||||
@ -108,7 +123,9 @@ public class SecurityConfig {
|
|||||||
.tokenValiditySeconds(2419200)
|
.tokenValiditySeconds(2419200)
|
||||||
.rememberMeParameter("remember-me"
|
.rememberMeParameter("remember-me"
|
||||||
).authenticationSuccessHandler(authenticationSuccessHandler)
|
).authenticationSuccessHandler(authenticationSuccessHandler)
|
||||||
)
|
).headers((header -> header.frameOptions()
|
||||||
|
.disable()
|
||||||
|
))
|
||||||
.csrf((csrf) ->
|
.csrf((csrf) ->
|
||||||
csrf.ignoringRequestMatchers(mvcMatcher.pattern("/logout")));
|
csrf.ignoringRequestMatchers(mvcMatcher.pattern("/logout")));
|
||||||
|
|
||||||
@ -116,7 +133,7 @@ public class SecurityConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@Order(3)
|
@Order(4)
|
||||||
public SecurityFilterChain shareResourcesFilterChain(@NotNull final HttpSecurity http, @NotNull final HandlerMappingIntrospector introspector) throws Exception {
|
public SecurityFilterChain shareResourcesFilterChain(@NotNull final HttpSecurity http, @NotNull final HandlerMappingIntrospector introspector) throws Exception {
|
||||||
final MvcRequestMatcher.Builder restfullMapper = new MvcRequestMatcher.Builder(introspector);
|
final MvcRequestMatcher.Builder restfullMapper = new MvcRequestMatcher.Builder(introspector);
|
||||||
|
|
||||||
@ -130,6 +147,8 @@ public class SecurityConfig {
|
|||||||
).build();
|
).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public UserDetailsService userDetailsService() {
|
public UserDetailsService userDetailsService() {
|
||||||
final UserDetailsService result = new UserDetailsService();
|
final UserDetailsService result = new UserDetailsService();
|
||||||
|
@ -4,4 +4,6 @@ User-agent: *
|
|||||||
Allow: /
|
Allow: /
|
||||||
Disallow: /c/restful/maps/*/document/xml-pub
|
Disallow: /c/restful/maps/*/document/xml-pub
|
||||||
Disallow: /c/maps/*/edit
|
Disallow: /c/maps/*/edit
|
||||||
|
Disallow: /c/maps/*/public
|
||||||
|
Disallow: /c/maps/*/try
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user