Sharing a users table between applications

17 views
Skip to first unread message

Henry Baragar

unread,
May 26, 2016, 10:16:13 AM5/26/16
to hobousers

Hello,

I have a suite of applications that need to have SSO.  I have implemented it by creating a "security" application that maintains the users table, to which all the other applications have read_only access, which I have set stripping down the users model (in the other applications) and adding the following line above the "hobo_users_model" line:

establish_connection "security_#{Rails.env}".to_sym

This works well except that "hobo g migration" always try to create/drop a users table (in the other applications).  What do I need to do to stop hobo from trying to create a users table?

Henry


--

 

Henry Baragar

Director, Software Development

CSE | Canadian Securities Exchange

(647) 729-8325

               

220 Bay Street, 9th Floor | Toronto | ON | Canada | M5J 2W4

www.thecse.com | @CSE_News 

 

Peter Booth

unread,
May 27, 2016, 4:18:44 AM5/27/16
to hobo...@googlegroups.com
Henry,

I don't know about your context but if it's internet facing then I'd strongly suggest that you separate your SSO from your application infrastructure. There are a bunch of open source and commercial SSO implementations that are battle hardened and robust. 

The reason for separating these is that most web frameworks, including Rails, are quite susceptible to DDOS. 

Peter

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "Hobo Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hobousers+...@googlegroups.com.
To post to this group, send email to hobo...@googlegroups.com.
Visit this group at https://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.

Henry Baragar

unread,
May 27, 2016, 8:45:17 AM5/27/16
to hobo...@googlegroups.com

Peter,

No, this is a suite of internal hobo applications that need to share authentication services. 

Thanks,

Henry

Ignacio Huerta

unread,
Jul 3, 2016, 4:47:33 AM7/3/16
to hobo...@googlegroups.com
Hi Henry,

In such a customised situation, Hobo does not currently have a way to
add "exceptions" to the migration generator.

I would advise to create migrations manually for your DB changes: "rails
g migration ...". Or just fix them manually after generating them.

Warm regards,
Ignacio

El 27-05-2016 a las 14:45, Henry Baragar escribió:
> Peter,
>
> No, this is a suite of internal hobo applications that need to share
> authentication services.
>
> Thanks,
>
> Henry
>
>
> On 27/05/16 04:18 AM, Peter Booth wrote:
>> Henry,
>>
>> I don't know about your context but if it's internet facing then I'd
>> strongly suggest that you separate your SSO from your application
>> infrastructure. There are a bunch of open source and commercial SSO
>> implementations that are battle hardened and robust.
>>
>> The reason for separating these is that most web frameworks, including
>> Rails, are quite susceptible to DDOS.
>>
>> Peter
>>
>> Sent from my iPhone
>>
>> On May 26, 2016, at 10:16 AM, Henry Baragar
>> <<mailto:Henry....@thecse.com>Henry....@theCSE.com> wrote:
>>
>>> Hello,
>>>
>>> I have a suite of applications that need to have SSO. I have
>>> implemented it by creating a "security" application that maintains
>>> the users table, to which all the other applications have read_only
>>> access, which I have set stripping down the users model (in the other
>>> applications) and adding the following line above the
>>> "hobo_users_model" line:
>>>
>>> establish_connection "security_#{Rails.env}".to_sym
>>>
>>> This works well except that "hobo g migration" always try to
>>> create/drop a users table (in the other applications). What do I
>>> need to do to stop hobo from trying to create a users table?
>>>
>>> Henry
>>>
>>>
>>> --
>>>
>>> * *
>>>
>>> *Henry Baragar*
>>>
>>> Director, Software Development
>>>
>>> *CSE* | *Canadian Securities Exchange*
>>>
>>> *D *(647) 729-8325
>>>
>>>
>>>
>>> 220 Bay Street, 9th Floor | Toronto | ON | Canada | M5J 2W4
>>>
>>> <http://www.thecse.com/>www.thecse.com | @CSE_News
>>> <https://twitter.com/CSE_News>
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Hobo Users" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to hobousers+...@googlegroups.com
>>> <mailto:hobousers+...@googlegroups.com>.
>>> To post to this group, send email to
>>> <mailto:hobo...@googlegroups.com>hobo...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/hobousers.
>>> For more options, visit https://groups.google.com/d/optout.
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Hobo Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an email to hobousers+...@googlegroups.com
>> <mailto:hobousers+...@googlegroups.com>.
>> To post to this group, send email to hobo...@googlegroups.com
>> <mailto:hobo...@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/hobousers.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
>
> * *
>
> *Henry Baragar*
>
> Director, Software Development
>
> *CSE* | *Canadian Securities Exchange*
>
> *D *(647) 729-8325
>
>
>
> 220 Bay Street, 9th Floor | Toronto | ON | Canada | M5J 2W4
>
> www.thecse.com <http://www.thecse.com/> | @CSE_News
> <https://twitter.com/CSE_News>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Hobo Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hobousers+...@googlegroups.com
> <mailto:hobousers+...@googlegroups.com>.
> To post to this group, send email to hobo...@googlegroups.com
> <mailto:hobo...@googlegroups.com>.

Ed Gomolka

unread,
Jul 18, 2016, 11:23:08 PM7/18/16
to Hobo Users
Henry:
There is an "ignore_tables" configuration statement for this. In your environment.rb file, place a line similar to the following:

  • Generators::Hobo::Migration::Migrator.ignore_tables = ["table1", "table2"]
There is also an "ignore_models" statement that you can use if you need to have a model ignored. I have had to use both statements to accommodate some of the gems that I use in my application.

Ed
Reply all
Reply to author
Forward
0 new messages