Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Bejam Nazer
    @bnassler_twitter
    however when I use the app it throws an argument error Unknown type :encrypted
    when I hit refresh it works but the encryption doesn't seem to work
    any ideas what I did wrong?
    Juan Gaviria
    @jgaviria
    Hello Bejam, have you tried defining your encrypted field this way?
    attr_encrypted :secretstuff, random_iv: true, compress: true, type: :json
    I added a few optional flags for compression and data type.
    If this is not what you are looking for, please add a few more details from your code (screenshots would help).
    Bejam Nazer
    @bnassler_twitter
    Hi @jgaviria I figured it out. My Model was called "Instance" and apparently that conflicted with something Rails also know under that name..
    weird error but it works now :)
    thanks anyway :)
    jayjlawrence
    @jayjlawrence
    Hi there - I just discovered Rocket Job and it appears to be exactly what I've been looking for. The one thing that I have a hard time with is the MongoDB dependency. Is there any appetite to allow for SQL or other types of repositories in Rocket Job?
    Reid Morrison
    @reidmorrison
    Rocket Job was created because all of the existing solutions that use things like relational databases and Redis could not scale to meet our enterprise batch processing requirements. MongoDB was the only data store we could find that is commonly used and supports an atomic find and modify operation. As a result Rocket Job scales to thousands of workers and still only requires a single MongoDB server ( or replicaset for high availability )
    jayjlawrence
    @jayjlawrence
    Thank you for this clarification. Is it possible to say that if we are willing to trade the performance offered by MongoDB with an SQL transaction that we could move to a SQL database?
    jayjlawrence
    @jayjlawrence
    @reidmorrison just following up as I am assessing job runners and I can't introduce MongoDB to my stack - would it be feasible to have someone develop the SQL storage strategy?
    Reid Morrison
    @reidmorrison
    Delayed Job is already a great solution for background processing using a SQL storage engine.
    jayjlawrence
    @jayjlawrence
    I guess that's a no
    And I'm already using delayed job ... and it's a good start. Rocket job looked more promising. Too bad.
    michaelsalexander83
    @michaelsalexander83
    Hello everyone, im trying to implement the symmetric-encryption gem.
    I followed the documentation and guide but its unclear to me how to correctly implement. I run the gem in development and production mode ( staging lateron ) and want to encrypt and decrypt certain values.
    is there a working rails example application to look at and learn from?
    Also im confused, my development environment runs on my osx locally, my production environment runs on heroku. So now i have generated configuration file with symmetric-encryption --generate --keystore heroku --app-name myapp --environments "development,staging,production" but if im read correct this is only a config file for heroku and will not work for development. How can I have both development and production environments correctly configured
    michaelsalexander83
    @michaelsalexander83
    currently getting an error 'wrong final block length'
    michaelsalexander83
    @michaelsalexander83
    anyone around here? i was wondering if there is an example rails application with the gem implemented.
    currently stuck with an exception and no idea how to resolve
    Justin Lyman
    @justinlyman
    I have a field that is currently encrypted with a random_iv, and I need to switch it to not use a random_iv so I can do queries on the field. Is there an easy way to do this? (this question is regarding V4 of the symmetric-encryption gem, rails 5 w/ Active Record)
    Reid Morrison
    @reidmorrison
    Yes, deploy the code change to remove the random iv, then run a job to re-encrypt that column for every row in the table.
    When the newly encrypted value is saved back to the database it will no longer have a random iv.
    This approach allows the change to occur without any downtime.
    Justin Lyman
    @justinlyman
    Perfect, I was hoping that would be the case, Thanks Reid!
    istrasci
    @istrasci

    Hello, I'm using symmetric-encryption in my Rails model. I have many encrypted attributes defined as

    attribute <column_name>, :encrypted, random_iv: true, type: <type>

    Is there any way to programmatically get the type from the column name?

    Tiago Cássio
    @tiagocassio
    Hello, guys
    I'm trying to encrypt data with the following piece of code
    attribute :api_key, :encrypted, random_iv: false
    when i change the api_key with some value, the persisted value is not crypted
    why?
    Fernando Contreras
    @fercreek
    Hi!!
    I have a question, someone migrates her database from Heroku to amazon or google? I´m trying to move my info and I don't know how to that using symmetric encryption
    Lee Parham
    @parhaml
    Hello!
    Trying to get started with rocketjob, is anyone around to ensure a standalone app is configured correctly?
    Using rocketjob 5.3.2
    ...
    2020-07-06 11:14:58.229861 I [77459:rocketjob main] RocketJob::CLI -- Rails not detected. Running standalone: development
    2020-07-06 11:14:58.249127 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    2020-07-06 11:14:58.249260 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    2020-07-06 11:14:58.358640 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    2020-07-06 11:14:58.364461 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    2020-07-06 11:14:58.364619 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    2020-07-06 11:14:58.370055 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    2020-07-06 11:14:58.377821 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    bundler: failed to load command: rocketjob (/Users/leeparham/.rbenv/versions/2.6.1/bin/rocketjob)
    2020-07-06 11:14:58.470919 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    NameError: undefined local variable or method `connection' for RocketJob::Jobs::ReEncrypt::RelationalJob:Class
    Did you mean?  collection
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/jobs/re_encrypt/relational_job.rb:43:in `block in <class:RelationalJob>'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/core_ext/module/attribute_accessors.rb:70:in `block in mattr_reader'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/core_ext/module/attribute_accessors.rb:52:in `each'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/core_ext/module/attribute_accessors.rb:52:in `mattr_reader'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/jobs/re_encrypt/relational_job.rb:41:in `<class:RelationalJob>'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/jobs/re_encrypt/relational_job.rb:20:in `<module:ReEncrypt>'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/jobs/re_encrypt/relational_job.rb:19:in `<module:Jobs>'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/jobs/re_encrypt/relational_job.rb:18:in `<module:RocketJob>'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/jobs/re_encrypt/relational_job.rb:17:in `<top (required)>'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/cli.rb:167:in `require'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/cli.rb:167:in `block in eager_load_jobs'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/cli.rb:163:in `each'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/cli.rb:163:in `eager_load_jobs'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/cli.rb:116:in `boot_standalone'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/cli.rb:43:in `run'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/bin/rocketjob:8:in `<top (required)>'
      /Users/leeparham/.rbenv/versions/2.6.1/bin/rocketjob:23:in `load'
      /Users/leeparham/.rbenv/versions/2.6.1/bin/rocketjob:23:in `<top (required)>'
    Lee Parham
    @parhaml
    It turns out that relational_job.rb needs sync_attr required
    begin
      require "active_record"
      require 'sync_attr'
    rescue LoadError
      raise 'RocketJob::Jobs::ReEncrypt::RelationalJob uses ActiveRecord to obtain the database connection, please install the gem "activerecord".'
    end
    Reid Morrison
    @reidmorrison
    Thank you for finding and resolving the issue. I pushed a permanent fix to the code base and will include it in the next version.
    Syed Sana Hassan
    @sana_hassan_twitter
    Hey, I am trying to send messages more than 1024 bytes but I see that it's getting truncated at around 1K (1026 to be exact), how can I increase the limit to log on a tcp rsyslog?
    Syed Sana Hassan
    @sana_hassan_twitter
    I am talking about Semantic Logger
    Syed Sana Hassan
    @sana_hassan_twitter
    Looks like the syslog_protocol gem is limiting it to 1024 chars.
    Reid Morrison
    @reidmorrison
    You could try implementing your own custom formatter that is derived from SemanticLogger::Formatters::Syslog and then see what the impact is if the limit is raised beyond 1024 chars by calling assemble instead of to_s on the packet?
    https://github.com/eric/syslog_protocol/blob/master/lib/syslog_protocol/packet.rb#L10
    If it works consider submitting a Pull Request that makes the max_size a configurable option for the formatter.
    Syed Sana Hassan
    @sana_hassan_twitter
    Ty, brilliant idea indeed I didn't see the last line https://github.com/rocketjob/semantic_logger/blob/master/lib/semantic_logger/formatters/syslog.rb#L80 and was hooked on to the packet, let me try to assemble it and see if it helps the packet size.
    Syed Sana Hassan
    @sana_hassan_twitter
    Syed Sana Hassan
    @sana_hassan_twitter
    @reidmorrison I believe the gem has to "tagged" with a new tag and "rails_semantic_logger" needs to be updated too? Would you be doing it or require a PR to update it?
    Reid Morrison
    @reidmorrison
    @sana_hassan_twitter Successfully registered gem: semantic_logger (4.7.2)
    Syed Sana Hassan
    @sana_hassan_twitter

    One thing I am getting is to include these two gems even though earlier I didn't have to include it in Gemfile, strange. Do you think it's a strange behavior?

    gem 'net_tcp_client' gem "syslog_protocol"

    Reid Morrison
    @reidmorrison
    Those are soft dependencies that are only needed when that specific appender is used.
    Sven Schwyn
    @svoop
    Hiya! I'm trying to encrypt large files asymmetrically. Turns out, the asymmetric part (encryption of a symmetric encryption secret) with openssl is quite easy, but I'm lacking a way to then symmetrically encrypt the large files on the filesystem without loading the entire file into memory. Then I found the symmetric-encryption gem which appears to fill this gap. Can you do this with symmetric-encryption alone or do you have to use iostreams as well? Maybe have an example for this use case?
    Sven Schwyn
    @svoop
    The docs are excellent and https://iostreams.rocketjob.io/tutorial mentions this use case, however, there's no example of how to best combine a reader and a writer to – say – to encrypt a large JPEG on the filesystem with minimal memory footprint.
    Reid Morrison
    @reidmorrison
    # Using Symmetric Encryption directly
    File.open("README.md", "r") do |reader|
      SymmetricEncryption::Writer.open("README.md.enc") do |writer|
        IO.copy_stream(reader, writer)
      end
    end
    
    # Using IOStreams
    source = IOStreams.path("README.md")
    IOStreams.path("README.md.enc").copy_from(source)