Skip to content

Commit 6314b3c

Browse files
committed
Release v1.5.0
2 parents c313da6 + 1490965 commit 6314b3c

File tree

5 files changed

+51
-37
lines changed

5 files changed

+51
-37
lines changed

README.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
:warning: This plugin needs the new modular driver system to work, which is available since Metabase version 0.32.
2-
31
# Firebird driver for metabase
42

53
This driver enables metabase to connect to [FirebirdSQL](https://firebirdsql.org/) databases.
64

75
## Installation:
86

9-
* Make sure you have installed a recent Metabase Version that supports drivers as plugins. (>=0.32)
10-
* Download the [latest release](https://github.com/evosec/metabase-firebird-driver/releases/latest) of the Firebird driver or build it from source. (See below)
7+
* Make sure you have installed a recent Metabase Version.
8+
* Download the [latest release](https://github.com/evosec/metabase-firebird-driver/releases/latest) of the Firebird driver or [build it from source](#building-from-source).
119
* Create the `plugins` directory if it doesn't already exist. By default that directory is next to the metabase.jar file, but you can specify a different directory by setting the environment varianble `MB_PLUGINS_DIR`.
1210
* Just drop the `firebird.metabase-driver.jar` in the plugins directory. On startup, metabase will load the plugin and the driver should be available.
1311

1412
## Authentication issues when using Legacy_Auth
1513

16-
The latest releases are built with version 4.x of Jaybird (the Firebird JDBC driver), [which no longer supports Legacy_Auth](https://www.firebirdsql.org/file/documentation/drivers_documentation/java/4.0.0/release_notes.html#removed-legacy_auth-from-default-authentication-plugins).
14+
The latest releases are built with version 4.x of Jaybird (the Firebird JDBC driver), [which no longer supports Legacy_Auth](https://www.firebirdsql.org/file/documentation/drivers_documentation/java/4.0.0/release_notes.html#removed-legacy_auth-from-default-authentication-plugins).
1715

18-
If you have problems accessing your database ([#14](https://github.com/evosec/metabase-firebird-driver/issues/14)) you can use the release artifact `firebird.metabase-driver_jaybird-3.jar` which is built with Jaybird 3.x.
16+
:warning: First of all: Legacy_Auth is disabled for a reason. You should only use the following workarounds if you have no way of using a more secure authentication method. :warning:
1917

20-
## Building from source:
18+
If you really need to access your database using Legacy_Auth ([#14](https://github.com/evosec/metabase-firebird-driver/issues/14)) you can [add it to the authentication plugins](https://www.firebirdsql.org/file/documentation/drivers_documentation/java/4.0.0/release_notes.html#configure-authentication-plugins). For example:
19+
```
20+
jdbc:firebirdsql://localhost/employee?authPlugins=Legacy_Auth
21+
```
2122

22-
For a detailed description, take a look at the [official documentation](https://github.com/metabase/metabase/wiki/Writing-A-Driver).
23+
If that does not work for you, you can use the release artifact `firebird.metabase-driver_jaybird-3.jar` which is built with Jaybird 3.x.
2324

24-
#### Prepare a local Metabase installation for building drivers
25+
## Building from source:
26+
27+
For a detailed description, take a look at the [official documentation](https://www.metabase.com/docs/latest/developers-guide/drivers/start.html).
2528

26-
* Download the Metabase sources (>=0.32)
27-
* Compile a local Metabase installation for building drivers
29+
* Checkout the main metabase repository and the firebird driver repository in the same parent directory:
2830
```
29-
lein install-for-building-drivers
31+
workspace
32+
- metabase
33+
- metabase-firebird-driver
3034
```
31-
32-
#### Build the driver
33-
34-
* Checkout the Firebird driver sources to `{metabase-source-dir}/modules/drivers/firebird`
35-
* Build the driver. This will create the .jar file in the directory `target/uberjar`. Just copy that file to your plugins directory and you are good to go!
35+
* Run the `build.sh` script from the metabase-firebird-driver repository
3636
```
37-
cd {metabase-source-dir}/modules/drivers/firebird
38-
lein clean
39-
LEIN_SNAPSHOTS_IN_RELEASE=true DEBUG=1 lein uberjar
37+
cd metabase-firebird-driver
38+
./build.sh
4039
```
40+
* The driver will now be built. The .jar file can be found in the `target` directory.

build.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Example for building the driver with bash or similar
2+
3+
DRIVER_PATH=`pwd`
4+
5+
# switch to the local checkout of the Metabase repo
6+
cd ../metabase
7+
8+
# get absolute path to the driver project directory
9+
10+
clojure \
11+
-Sdeps "{:aliases {:firebird {:extra-deps {evosec/firebird-driver {:local/root \"$DRIVER_PATH\"}}}}}" \
12+
-X:build:firebird \
13+
build-drivers.build-driver/build-driver! \
14+
"{:driver :firebird, :project-dir \"$DRIVER_PATH\", :target-dir \"$DRIVER_PATH/target\"}"

deps.edn

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{:paths
2+
["src" "resources"]
3+
4+
5+
:deps
6+
{org.firebirdsql.jdbc/jaybird {:mvn/version "4.0.9.java8"}}
7+
8+
;; build the driver with clojure -X:build
9+
:aliases
10+
{:build
11+
{:extra-deps {metabase/metabase-core {:local/root "../metabase"}
12+
metabase/build-drivers {:local/root "../metabase/bin/build-drivers"}}
13+
:exec-fn build-drivers.build-driver/build-driver!
14+
:exec-args {:driver :firebird
15+
:project-dir "."
16+
:target-dir "./target"}}}}

project.clj

-16
This file was deleted.

src/metabase/driver/firebird.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
;; this point.
106106
(.execute stmt)))
107107

108-
(defmethod sql-jdbc.sync/have-select-privilege? :sql-jdbc
108+
(defmethod sql-jdbc.sync/have-select-privilege? :firebird
109109
[driver conn table-schema table-name]
110110
;; Query completes = we have SELECT privileges
111111
;; Query throws some sort of no permissions exception = no SELECT privileges

0 commit comments

Comments
 (0)