Skip to content

Commit

Permalink
Release v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikos410 committed Jul 18, 2023
2 parents c313da6 + 1490965 commit 6314b3c
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 37 deletions.
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
:warning: This plugin needs the new modular driver system to work, which is available since Metabase version 0.32.

# Firebird driver for metabase

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

## Installation:

* Make sure you have installed a recent Metabase Version that supports drivers as plugins. (>=0.32)
* Download the [latest release](https://github.com/evosec/metabase-firebird-driver/releases/latest) of the Firebird driver or build it from source. (See below)
* Make sure you have installed a recent Metabase Version.
* 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).
* 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`.
* Just drop the `firebird.metabase-driver.jar` in the plugins directory. On startup, metabase will load the plugin and the driver should be available.

## Authentication issues when using Legacy_Auth

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).
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).

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.
: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:

## Building from source:
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:
```
jdbc:firebirdsql://localhost/employee?authPlugins=Legacy_Auth
```

For a detailed description, take a look at the [official documentation](https://github.com/metabase/metabase/wiki/Writing-A-Driver).
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.

#### Prepare a local Metabase installation for building drivers
## Building from source:

For a detailed description, take a look at the [official documentation](https://www.metabase.com/docs/latest/developers-guide/drivers/start.html).

* Download the Metabase sources (>=0.32)
* Compile a local Metabase installation for building drivers
* Checkout the main metabase repository and the firebird driver repository in the same parent directory:
```
lein install-for-building-drivers
workspace
- metabase
- metabase-firebird-driver
```

#### Build the driver

* Checkout the Firebird driver sources to `{metabase-source-dir}/modules/drivers/firebird`
* 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!
* Run the `build.sh` script from the metabase-firebird-driver repository
```
cd {metabase-source-dir}/modules/drivers/firebird
lein clean
LEIN_SNAPSHOTS_IN_RELEASE=true DEBUG=1 lein uberjar
cd metabase-firebird-driver
./build.sh
```
* The driver will now be built. The .jar file can be found in the `target` directory.
14 changes: 14 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Example for building the driver with bash or similar

DRIVER_PATH=`pwd`

# switch to the local checkout of the Metabase repo
cd ../metabase

# get absolute path to the driver project directory

clojure \
-Sdeps "{:aliases {:firebird {:extra-deps {evosec/firebird-driver {:local/root \"$DRIVER_PATH\"}}}}}" \
-X:build:firebird \
build-drivers.build-driver/build-driver! \
"{:driver :firebird, :project-dir \"$DRIVER_PATH\", :target-dir \"$DRIVER_PATH/target\"}"
16 changes: 16 additions & 0 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{:paths
["src" "resources"]


:deps
{org.firebirdsql.jdbc/jaybird {:mvn/version "4.0.9.java8"}}

;; build the driver with clojure -X:build
:aliases
{:build
{:extra-deps {metabase/metabase-core {:local/root "../metabase"}
metabase/build-drivers {:local/root "../metabase/bin/build-drivers"}}
:exec-fn build-drivers.build-driver/build-driver!
:exec-args {:driver :firebird
:project-dir "."
:target-dir "./target"}}}}
16 changes: 0 additions & 16 deletions project.clj

This file was deleted.

2 changes: 1 addition & 1 deletion src/metabase/driver/firebird.clj
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
;; this point.
(.execute stmt)))

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

10 comments on commit 6314b3c

@AntoninoRocha
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, I need your help with the Firebird 1.5 drive, find out that the base is connected but when performing a search in the tables it does not open and the following information appears
"No suitable drivers found for jdbc:firebirdsql://192.168.100.2:3050//home/bases/basedados_master.fdb?encoding=ISO8859_1"

and also
"Attention: :firebird driver is using Honey SQL 1. This method is deprecated in 0.46.0 and will be deleted in a future release."
Thank you very much in advance for your help.

@AntoninoRocha
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Google translator

@AntoninoRocha
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sir, it is essential to solve this, it may not help by reviewing it because I try everything possible, it doesn't work, my firebird is 2.5, thank you very much anyway. grateful.
tradutor google

@dodgex
Copy link
Member

@dodgex dodgex commented on 6314b3c Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nikos410 can you have a Look?

@AntoninoRocha you probably should have opened an issue instead of commenting on a commit.

@AntoninoRocha
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgive me

@Nikos410
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AntoninoRocha No need to apologize! I've opened an issue to track this problem: #19

@AntoninoRocha
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, I'm going to convert 2.5 to 3.0 but just for testing, what I have is in production firebird 2.5 the metabase is the latest version.

@AntoninoRocha
Copy link

@AntoninoRocha AntoninoRocha commented on 6314b3c Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello everyone, as promised, I conducted tests with the same information "No suitable driver found for jdbc:.........". The steps I took were as follows:

  1. With the 2.5 version, I performed a backup.
  2. Restored it in version 3.0.
  3. Conducted access tests through ibexpert and others, and access was okay.
  4. Installed Metabase with one driver at a time.

However, I was not successful; both in version 2.5 and 3.0, the same message as mentioned above appeared.

@Michael-1Mueller
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same Problem here, latest Metabase and the latest Firebird plugin version, just installed.
"No suitable driver found for jdbc:firebirdsql"

But also I am not clear where to put the DB path in my case its windows C:\DB\DB.FDB thats where I can access it currently frm various clients.

@AntoninoRocha
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guys, I did a lot of tests here, and I came to a possible conclusion.
After migrating to version 0.48 with the second Postgres database and accessing Firebird, the database where the metabase accesses the created cards is no longer accessible, and if you go back to the previous version 0.47 the situation remains the same and cannot be reversed. You get the following error "Caused by: org.postgresql.util.PSQLException: ERROR: relation "data_migrations" does not exist
Position: 15"

version 0.48 has Firebird inconsistency but the drive is working

I believe it is in the metabase

Please sign in to comment.