migrating legacy application with existing devise users - ruby-on-rails

A rails application is running an old version and needs to jump multiple generations. In addition, users were managed by devise in multiple tables, when the target is now to unify them.
The problem lies with databases and legacy encrypted passwords. The documentation provides indication as to legacy migration TO devise , but not devise-to-devise. While the db has the encrypted_password attribute, can this be carried over to a new database (seemlessly to the user) and how?

Related

Neo4J upgrade: why are the user roles not transfered?

When upgrading from Neo4J 3.3.3 community to enterprise (or even between the versions), I noticed that the users, user roles, and permissions are not transferred.
Is this normal?
Do I have to set up the users manually every time there's an upgrade because they are stored in a separate DB?
In Neo4j 3.x.x, user and authentication data is stored in various directories at NEO4J_HOME/data/dbms, so you need to make sure you copy this over when you perform an upgrade within 3.x.x, and to sync this yourself if you're using a cluster.
In Neo4j 4.x.x, we introduced the concept of the system database to hold user, database, and security data, and this is automatically synced to a cluster. For backup/restore/upgrade you will need to include the system database when you perform these operations.
So we didn't have the concept of a separate database for this before 4.0, it only lived within discrete files.

Migrating Wordpress legacy app to RoR with Devise. Password hash

I have a database with hundreds of users on an old Wordpress application that I want to migrate to a new RoR application. I am stuck with the passwords. Wordpress has a different encryption than Devise. Its pattern starts with "$P$".
How can I do to create a custom encryptor/digest for my Devise User model to authenticate the old passwords?

Ruby on Rails: Postgres, connect as different user

I have a Rails app that successfully talks to a Postgres database. The app has full Postgres access rights and is successfully talking to the database.
I use Devise to authenticate my users. I know this is independent of PG but I mention it to make what I want below somewhat clearer.
The app maintains a (Devise) table of users. The app has several users and I want to have each user have different access (roles?) to the database.
I want to create a sandbox where User can issue PG commands but has, for instance, only readonly access rights to the database.
How do I do this. I've searched Google for several hours but I've come up with zilch.

Can I transfer Devise users from one database to another?

I rebuilt my application from scratch, and in that process, I changed the database from MongoDB to PostgreSQL. I've got existing users who signed up via Devise on the MongoDB database and would like to transfer them to the PostgreSQL database, which is also using Devise.
Is this possible, and if so, how? From a preliminary test of creating users with the same email and password in each version of the application, the encrypted_password is different.

Use "database users" to authenticate in Ruby on Rails

I have a PostgreSQL database that I access from various locations, and would like to add an interface with Ruby on Rails 3. For authentication I need to login users with the same credentials used to create them directly in the database; is there a way to make Rails connect to the database each time with different username/password, based on the current user?
Thanks for any hints!
Yes.
Use a custom authentication on devise that makes a query to the underlying postgresql database.
See:
Custom authentication strategy for devise
I would certainly add some kind of filter to reduce the list of users that can authenticate this way.

Resources