SHIPS
SHIPS copied to clipboard
Error when trying to run the application
Hi there.
I'trying to start the application using: ruby -r ./lib/identsqlite SHIPS.rb
The error i'm getting is Encountered a fatal startup error! undefined method
map' for nil:NilClass - /opt/SHIPS-master/lib/configuration.rb:14:in keys_to_sym'
Is this do to some error in the etc/conf file?
I've been lost for some time now on this issue.
BTW i've pasted my etc/conf yaml file to http://www.yamllint.com/ and it gives me a "Valid YAML!"
Your yaml configuration is wrongly formatted on GitHub. Those spaces in beginning of every line shouldn't be there.
When one problem is solved, another one emerges :).
When I run this command now ruby -r ./lib/identsqlite SHIPS.rb
I get nothing. It's like the application does not even try to start.
There are no log files created. You can see my config here.
`web: port: 443 serverName: xxx.xxx.xxx.xxx maxclients: 1000 #daemonUser: ships Log: /var/log/ships.log SSLCertificate: /opt/SHIPS-master/etc/ships.pem SSLPrivateKey: /opt/SHIPS-master/etc/ships.key
data: dataPath: /var/cache/SHIPS.sqlite styleSheet: /opt/SHIPS-master/etc/style.css
app: syslog: true sessionTimeout: 300 foreground: ture superUserIdent: IdentSQLite superUserToken: "1" defaultLoginIdent: IdentSQLite allowedLoginIdents:
- IdentSQLite
devices: length: 20 age: 7
identityOptions: #exampleOption: exampleValue #identLDAP_host: 10.10.10.10 #identLDAP_port: 389 #identLDAP_encryption: simple_tls #identLDAP_user_base: DC=example,DC=local #identLDAP_group_base: OU=Test,DC=example,DC=local #identLDAP_name_attribute: sAMAccountName #identLDAP_group_class: group #identLDAP_user_class: user #identLDAP_token_attribute: objectSid #identLDAP_group_attribute: memberOf #identLDAP_user_attribute: "member:1.2.840.113556.1.4.1941:" #identLDAP_group_required: CN=SHIPS users,OU=Test,DC=example,DC=local #identLDAP_username: CN=ships DS. reader,OU=Test,DC=example,DC=local #identLDAP_password: SomeReallHardPassword #identDevice_default_folder: 2 #identDevice_validators: #- DeviceValidatorLDAP #- DeviceValidatorAny
validatorOptions: #exampleOption: exampleValue #DeviceValidatorLDAP_host: 10.10.10.10 #DeviceValidatorLDAP_encryption: simple_tls #DeviceValidatorLDAP_port: 389 #DeviceValidatorLDAP_base: DC=example,DC=local #DeviceValidatorLDAP_username: CN=ships DS. reader,OU=Test,DC=example,DC=local #DeviceValidatorLDAP_password: SomeReallHardPassword #DeviceValidatorLDAP_class: computer #DeviceValidatorLDAP_name_attribute: name `
Any advice would be much appreciated :)
That looks like a problem with install of the SQLite3 gem. Maybe try to reinstall that? If you are on Linux you probably need to have your sqlite3 development packages and openssl development packages installed to get the gem’s native components to build properly.
Geoff Walton | Senior Security Consultant CISSP TRUSTEDSEC, LLC Cell: 440.344.8967 | US EDT (GMT -5) Staunton, VA Office Email: [email protected]mailto:[email protected] https://www.trustedsec.comhttps://www.trustedsec.com/
"INFORMATION SECURITY MADE SIMPLE" - TRUSTEDSEC
From: Sigursteinn Bjarni Húbertsson [email protected] Reply-To: trustedsec/SHIPS [email protected] Date: Friday, February 17, 2017 at 2:18 PM To: trustedsec/SHIPS [email protected] Cc: Subscribed [email protected] Subject: [EXTERNAL] Re: [trustedsec/SHIPS] Error when trying to run the application (#9)
Your yaml configuration is wrongly formatted on GitHub. Those spaces in beginning of every line shouldn't be there.
When one problem is solved, another one emerges :).
When I run this command now ruby -r ./lib/identsqlite SHIPS.rb I get nothing.
It's like it just starts up and shuts down:
Here is my new error open("/usr/local/share/gems/gems/SQLiteORM-0.9.2/lib/openssl.rb", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/share/gems/gems/sqlite3-1.3.13/lib/openssl.rb", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib64/gems/ruby/sqlite3-1.3.13/openssl.rb", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/share/gems/gems/usa-0.9.0/lib/openssl.rb", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/share/ruby/site_ruby/openssl.rb", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib64/ruby/site_ruby/openssl.rb", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/ruby/vendor_ruby/openssl.rb", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib64/ruby/vendor_ruby/openssl.rb", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/rubygems/openssl.rb", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/trustedsec/SHIPS/issues/9#issuecomment-280741243, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKKpBRIRj1LwtcK9NpBiwnhaY_h4uzUeks5rdfKBgaJpZM4MEgh8.
Hi Geoff and thank you for your answer.
I've tried reinstalling the sqlite3 gem gem uninstall sqlite3 ; gem install sqlite3
I have the sqlite3 development packages and openssl development packages, i've installed them through the yum package manager.
sqlite-devel.x86_64 : Development tools for the sqlite3 embeddable SQL database engine
openssl-devel.x86_64 : Files for development of applications which will use
If I run the command in debug mode I get the following
ruby -r ./lib/identsqlite.rb -d SHIPS.rb
Exception
LoadError' at /usr/local/share/ruby/site_ruby/rubygems.rb:1354 - cannot load such file -- rubygems/defaults/ruby
Exception LoadError' at /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- abrt Exception
LoadError' at /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:135 - cannot load such file -- abrt
Exception LoadError' at /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- usa /usr/local/share/gems/gems/usa-0.9.0/lib/usa/logoffservlet.rb:24: warning: mismatched indentations at 'end' with 'def' at 15 /opt/SHIPS-master/lib/directory_models.rb:50: warning: assigned but unused variable - bitlen /opt/SHIPS-master/lib/directory_models.rb:58: warning: assigned but unused variable - bitlen Exception
LoadError' at /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- SQLiteORM
/usr/local/share/gems/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:66: warning: mismatched indentations at 'end' with 'case' at 54
/usr/local/share/gems/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:414: warning: *' interpreted as argument prefix Exception
LoadError' at /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- sqlite3/2.0/sqlite3_native
Exception LoadError' at /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:135 - cannot load such file -- sqlite3/2.0/sqlite3_native /usr/local/share/gems/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized /usr/local/share/gems/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized /usr/local/share/gems/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized Exception
NameError' at /usr/share/ruby/psych/core_ext.rb:16 - method to_yaml' not defined in Object Exception
NameError' at /usr/share/ruby/psych/core_ext.rb:29 - method yaml_as' not defined in Module Exception
NameError' at /usr/share/ruby/psych/deprecated.rb:80 - undefined method to_yaml_properties' for class
Object'
/usr/local/share/gems/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/usr/local/share/gems/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/usr/local/share/gems/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/usr/local/share/gems/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/opt/SHIPS-master/lib/document_models.rb:232: warning: method redefined; discarding old new_Folder
/usr/local/share/gems/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:413: warning: previous definition of new_Folder was here
/opt/SHIPS-master/lib/document_models.rb:240: warning: method redefined; discarding old new_Document
/usr/local/share/gems/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:413: warning: previous definition of new_Document was here
/usr/local/share/gems/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/usr/local/share/gems/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/opt/SHIPS-master/lib/servlets/login.rb:19: warning: assigned but unused variable - identTypes
/opt/SHIPS-master/lib/servlets/login.rb:20: warning: assigned but unused variable - defaultIdent
/opt/SHIPS-master/lib/servlets/login.rb:21: warning: assigned but unused variable - redirect_path
`
I'm not sure why I am getting these error or how to solve them.
Hi @SigursteinnBjarni,
I'm facing the same issue that you had:
ruby -r ./lib/identsqlite.rb -d SHIPS.rb
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems.rb:1203 - cannot load such file -- rubygems/defaults/ruby
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- usa
/var/lib/gems/2.1.0/gems/usa-0.9.0/lib/usa/logoffservlet.rb:24: warning: mismatched indentations at 'end' with 'def' at 15
/opt/SHIPS-master/lib/directory_models.rb:50: warning: assigned but unused variable - bitlen
/opt/SHIPS-master/lib/directory_models.rb:58: warning: assigned but unused variable - bitlen
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- SQLiteORM
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:66: warning: mismatched indentations at 'end' with 'case' at 54
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:414: warning: `*' interpreted as argument prefix
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- sqlite3/2.1/sqlite3_native
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:141 - cannot load such file -- sqlite3/2.1/sqlite3_native
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
Exception `NameError' at /usr/lib/ruby/2.1.0/psych/class_loader.rb:67 - uninitialized constant BigDecimal
Exception `NameError' at /usr/lib/ruby/2.1.0/psych/core_ext.rb:16 - method `to_yaml' not defined in Object
Exception `NameError' at /usr/lib/ruby/2.1.0/psych/core_ext.rb:29 - method `yaml_as' not defined in Module
Exception `NameError' at /usr/lib/ruby/2.1.0/psych/deprecated.rb:81 - undefined method `to_yaml_properties' for class `Object'
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/opt/SHIPS-master/lib/document_models.rb:232: warning: method redefined; discarding old new_Folder
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:413: warning: previous definition of new_Folder was here
/opt/SHIPS-master/lib/document_models.rb:240: warning: method redefined; discarding old new_Document
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:413: warning: previous definition of new_Document was here
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/opt/SHIPS-master/lib/servlets/login.rb:19: warning: assigned but unused variable - identTypes
/opt/SHIPS-master/lib/servlets/login.rb:20: warning: assigned but unused variable - defaultIdent
/opt/SHIPS-master/lib/servlets/login.rb:21: warning: assigned but unused variable - redirect_path
Could you tell me please if you managed to reselve it and how?
Thanks in advance!
From a quick look at things possibly your sqlite3 gem did not build/install correctly.
Can you try to run ‘gem install sqlite3’ in your environment. Make sure that completes without error.
From: artois333 [email protected] Reply-To: trustedsec/SHIPS [email protected] Date: Wednesday, July 5, 2017 at 5:37 AM To: trustedsec/SHIPS [email protected] Cc: Geoff Walton [email protected], Comment [email protected] Subject: Re: [trustedsec/SHIPS] Error when trying to run the application (#9)
Hi SigursteinnBjarni,
I'm facing the same issue that you had:
ruby -r ./lib/identsqlite.rb -d SHIPS.rb
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems.rb:1203 - cannot load such file -- rubygems/defaults/ruby
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- usa
/var/lib/gems/2.1.0/gems/usa-0.9.0/lib/usa/logoffservlet.rb:24: warning: mismatched indentations at 'end' with 'def' at 15
/opt/SHIPS-master/lib/directory_models.rb:50: warning: assigned but unused variable - bitlen
/opt/SHIPS-master/lib/directory_models.rb:58: warning: assigned but unused variable - bitlen
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- SQLiteORM
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:66: warning: mismatched indentations at 'end' with 'case' at 54
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:414: warning: `*' interpreted as argument prefix
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- sqlite3/2.1/sqlite3_native
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:141 - cannot load such file -- sqlite3/2.1/sqlite3_native
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
Exception `NameError' at /usr/lib/ruby/2.1.0/psych/class_loader.rb:67 - uninitialized constant BigDecimal
Exception NameError' at /usr/lib/ruby/2.1.0/psych/core_ext.rb:16 - method
to_yaml' not defined in Object
Exception NameError' at /usr/lib/ruby/2.1.0/psych/core_ext.rb:29 - method
yaml_as' not defined in Module
Exception NameError' at /usr/lib/ruby/2.1.0/psych/deprecated.rb:81 - undefined method
to_yaml_properties' for class `Object'
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/opt/SHIPS-master/lib/document_models.rb:232: warning: method redefined; discarding old new_Folder
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:413: warning: previous definition of new_Folder was here
/opt/SHIPS-master/lib/document_models.rb:240: warning: method redefined; discarding old new_Document
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:413: warning: previous definition of new_Document was here
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/opt/SHIPS-master/lib/servlets/login.rb:19: warning: assigned but unused variable - identTypes
/opt/SHIPS-master/lib/servlets/login.rb:20: warning: assigned but unused variable - defaultIdent
/opt/SHIPS-master/lib/servlets/login.rb:21: warning: assigned but unused variable - redirect_path
Could you tell me please if you managed to reselve it and how?
Thanks in advance!
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/trustedsec/SHIPS/issues/9#issuecomment-313053504, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKKpBUJrabiDc_5dm0_WIDPElG3tNlWzks5sK1lYgaJpZM4MEgh8.
Hello @GeoffWalton , Thanks for your reply. I have tried several things. I also reinstalled everything whithout any errors but I have the same issue every time:
root@dushipspoc2:/opt/SHIPS-master# ruby -r ./lib/identsqlite.rb -d SHIPS.rb
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems.rb:1203 - cannot load such file -- rubygems/defaults/ruby
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- usa
/var/lib/gems/2.1.0/gems/usa-0.9.0/lib/usa/logoffservlet.rb:24: warning: mismatched indentations at 'end' with 'def' at 15
/opt/SHIPS-master/lib/directory_models.rb:50: warning: assigned but unused variable - bitlen
/opt/SHIPS-master/lib/directory_models.rb:58: warning: assigned but unused variable - bitlen
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- SQLiteORM
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:66: warning: mismatched indentations at 'end' with 'case' at 54
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:414: warning: `*' interpreted as argument prefix
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- sqlite3/2.1/sqlite3_native
Exception `LoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:141 - cannot load such file -- sqlite3/2.1/sqlite3_native
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
Exception `NameError' at /usr/lib/ruby/2.1.0/psych/class_loader.rb:67 - uninitialized constant BigDecimal
Exception `NameError' at /usr/lib/ruby/2.1.0/psych/core_ext.rb:16 - method `to_yaml' not defined in Object
Exception `NameError' at /usr/lib/ruby/2.1.0/psych/core_ext.rb:29 - method `yaml_as' not defined in Module
Exception `NameError' at /usr/lib/ruby/2.1.0/psych/deprecated.rb:81 - undefined method `to_yaml_properties' for class `Object'
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/opt/SHIPS-master/lib/document_models.rb:232: warning: method redefined; discarding old new_Folder
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:413: warning: previous definition of new_Folder was here
/opt/SHIPS-master/lib/document_models.rb:240: warning: method redefined; discarding old new_Document
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:413: warning: previous definition of new_Document was here
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized
/opt/SHIPS-master/lib/servlets/login.rb:19: warning: assigned but unused variable - identTypes
/opt/SHIPS-master/lib/servlets/login.rb:20: warning: assigned but unused variable - defaultIdent
/opt/SHIPS-master/lib/servlets/login.rb:21: warning: assigned but unused variable - redirect_path
Exception `NoMethodError' at /opt/SHIPS-master/lib/configuration.rb:14 - undefined method `map' for nil:NilClass
Encountered a fatal startup error!
undefined method `map' for nil:NilClass - /opt/SHIPS-master/lib/configuration.rb:14:in `keys_to_sym'
My gems versions:
root@dushipspoc2:/opt/SHIPS-master# gem list
*** LOCAL GEMS ***
bigdecimal (1.2.4)
io-console (0.4.2)
json (1.8.1)
minitest (4.7.5)
net-ldap (0.16.0)
psych (2.0.5)
rake (10.1.0)
rdoc (4.1.0)
sqlite3 (1.3.13)
SQLiteORM (0.9.2)
test-unit (2.1.5.0)
usa (0.9.0)
Could you please provide your working configuration/versions please.
Looking at the very last error message lines there it could be a config parsing issue. I am including a working sample as requested. Please be sure to watch the indentation (spaces) in the file as yaml parsing can be quite sensitive. Note this config is running a local ships server against LDAP for testing.
------BEGIN CONFIG----- web: port: 10443 serverName: 127.0.0.1 maxclients: 1000 #daemonUser: daemon #SSLCertificate: /path/to/cert/pem #SSLPrivateKey: /path/to/key
data:
dataPath: /Users/testuser/Desktop/SHIPS.sqlite
styleSheet: /path/to/style/sheet
app: syslog: true sessionTimeout: 300 foreground: true superUserIdent: IdentSQLite superUserToken: "1" ACLAuthorsIdent: IdentSQLite ACLAuthorsToken: "1" defaultLoginIdent: IdentSQLite allowedLoginIdents:
- IdentSQLite
devices: length: 20 age: 7
identityOptions:
exampleOption: exampleValue
identLDAP_host: 10.10.10.10 identLDAP_port: 389
identLDAP_encryption: simple_tls
identLDAP_user_base: DC=example,DC=local identLDAP_group_base: OU=Test,DC=example,DC=local identLDAP_name_attribute: sAMAccountName identLDAP_group_class: group identLDAP_user_class: user identLDAP_token_attribute: objectSid identLDAP_group_attribute: memberOf identLDAP_user_attribute: "member:1.2.840.113556.1.4.1941:" identLDAP_group_required: CN=SHIPS users,OU=Test,DC=example,DC=local identLDAP_username: CN=ships DS. reader,OU=Test,DC=example,DC=local identLDAP_password: H@rdP@s$w0Rd identDevice_default_folder: 2 identDevice_validators:
- DeviceValidatorLDAP
validatorOptions:
exampleOption: exampleValue
DeviceValidatorLDAP_host: 10.10.10.10
DeviceValidatorLDAP_encryption: simple_tls
DeviceValidatorLDAP_port: 389 DeviceValidatorLDAP_base: DC=example,DC=local DeviceValidatorLDAP_username: CN=ships DS. reader,OU=Test,DC=example,DC=local DeviceValidatorLDAP_password: H@rdP@s$w0Rd DeviceValidatorLDAP_class: computer DeviceValidatorLDAP_name_attribute: name ------END CONFIG-----
From: artois333 [email protected] Reply-To: trustedsec/SHIPS [email protected] Date: Monday, July 10, 2017 at 5:35 AM To: trustedsec/SHIPS [email protected] Cc: Geoff Walton [email protected], Mention [email protected] Subject: Re: [trustedsec/SHIPS] Error when trying to run the application (#9)
Hello @GeoffWaltonhttps://github.com/geoffwalton , Thanks for your reply. I have tried several things? I also reinstalled everything whichout any errors but I have the same issue every time:
root@dushipspoc2:/opt/SHIPS-master# ruby -r ./lib/identsqlite.rb -d SHIPS.rb ExceptionLoadError' at /usr/lib/ruby/2.1.0/rubygems.rb:1203 - cannot load such file -- rubygems/defaults/ruby Exception LoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- usa /var/lib/gems/2.1.0/gems/usa-0.9.0/lib/usa/logoffservlet.rb:24: warning: mismatched indentations at 'end' with 'def' at 15 /opt/SHIPS-master/lib/directory_models.rb:50: warning: assigned but unused variable - bitlen /opt/SHIPS-master/lib/directory_models.rb:58: warning: assigned but unused variable - bitlen ExceptionLoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- SQLiteORM /var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:66: warning: mismatched indentations at 'end' with 'case' at 54 /var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:414: warning: *' interpreted as argument prefix ExceptionLoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- sqlite3/2.1/sqlite3_native Exception LoadError' at /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:141 - cannot load such file -- sqlite3/2.1/sqlite3_native /var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized /var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized /var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized ExceptionNameError' at /usr/lib/ruby/2.1.0/psych/class_loader.rb:67 - uninitialized constant BigDecimal Exception NameError' at /usr/lib/ruby/2.1.0/psych/core_ext.rb:16 - methodto_yaml' not defined in Object Exception NameError' at /usr/lib/ruby/2.1.0/psych/core_ext.rb:29 - methodyaml_as' not defined in Module Exception NameError' at /usr/lib/ruby/2.1.0/psych/deprecated.rb:81 - undefined methodto_yaml_properties' for class Object' /var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized /var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized /var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized /var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized /opt/SHIPS-master/lib/document_models.rb:232: warning: method redefined; discarding old new_Folder /var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:413: warning: previous definition of new_Folder was here /opt/SHIPS-master/lib/document_models.rb:240: warning: method redefined; discarding old new_Document /var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:413: warning: previous definition of new_Document was here /var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized /var/lib/gems/2.1.0/gems/SQLiteORM-0.9.2/lib/SQLiteORM.rb:177: warning: instance variable @lock not initialized /opt/SHIPS-master/lib/servlets/login.rb:19: warning: assigned but unused variable - identTypes /opt/SHIPS-master/lib/servlets/login.rb:20: warning: assigned but unused variable - defaultIdent /opt/SHIPS-master/lib/servlets/login.rb:21: warning: assigned but unused variable - redirect_path ExceptionNoMethodError' at /opt/SHIPS-master/lib/configuration.rb:14 - undefined method map' for nil:NilClass Encountered a fatal startup error! undefined methodmap' for nil:NilClass - /opt/SHIPS-master/lib/configuration.rb:14:in keys_to_sym' My gems verions:
`root@dushipspoc2:/opt/SHIPS-master# gem list
*** LOCAL GEMS ***
bigdecimal (1.2.4) io-console (0.4.2) json (1.8.1) minitest (4.7.5) net-ldap (0.16.0) psych (2.0.5) rake (10.1.0) rdoc (4.1.0) sqlite3 (1.3.13) SQLiteORM (0.9.2) test-unit (2.1.5.0) usa (0.9.0) ` Could you please provide your working configuration/version please.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/trustedsec/SHIPS/issues/9#issuecomment-314055748, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKKpBdlW0SDbY-FgruhFUDbyRtg8QGDXks5sMfBhgaJpZM4MEgh8.
@GeoffWalton , Thank you very much for this example. My ships process has started now and I can view the login page. However, using IdentSQLite root account for login redirects me on the login page:
I have already tried resetting root password in the database but this doesn't help.
Please find attached my conf file. conf-ships.txt
Would you have any suggestions please? How can I change the log level to set debug?
A little update: my issue was in Internet Explorer and the certificate.
I could setup the configuration following the video guide: https://www.trustedsec.com/2016/03/ships-version-2-released-major-release/
However, when I'm trying to run the client script, the server returns :
false,unable to process request,0,2017-07-28 15:21:54
user.log gives this error:
(IdentDevice) @ dushipspoc - found by DeviceValidatorAny new device
(IdentDevice) @ dushipspoc - Document does not have a value for name set @ /opt/SHIPS-master/lib/document_models.rb:14:in `before_save'
@GeoffWalton , would you have any idea about this error please?
Found my issue. the URL generated by the client was missing &name=
due to the URL_OPTS var.
From the looks of the that log message the server is not seeing the computer name in the request. I assume you are using the SetAdminPass.vbs client? If so maybe run it with wscript and a line like
MsgBox(QUERYSTRING & "name=" & strname & "&nonce=" & ch_history(1))
Right before line 219 so we can see what that script is trying to send to the server.
Geoff Walton | Senior Security Consultant CISSP TRUSTEDSEC, LLC C: 440.344.8967 Office: 877.550.4728 E: [email protected] https://www.trustedsec.comhttps://www.trustedsec.com/
YOUR TRUSTED SOURCE FOR INFORMATION SECURITY
From: artois333 [email protected] Reply-To: trustedsec/SHIPS [email protected] Date: Friday, July 28, 2017 at 9:32 AM To: trustedsec/SHIPS [email protected] Cc: Geoff Walton [email protected], Mention [email protected] Subject: Re: [trustedsec/SHIPS] Error when trying to run the application (#9)
A little update: my issue was in Internet Explorer and the certificate.
I could setup the configuration following the video guide: https://www.trustedsec.com/2016/03/ships-version-2-released-major-release/
However, when I'm trying to run the client script, the server returns : false,unable to process request,0,2017-07-28 15:21:54
user.log gives this error:
(IdentDevice) @ dushipspoc - found by DeviceValidatorAny new device
(IdentDevice) @ dushipspoc - Document does not have a value for name set @ /opt/SHIPS-master/lib/document_models.rb:14:in `before_save'
@GeoffWaltonhttps://github.com/geoffwalton , would you have any idea about this error please?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/trustedsec/SHIPS/issues/9#issuecomment-318652711, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKKpBfquus6A6CvrjgRUeY7_LbyGfZL6ks5sSeLsgaJpZM4MEgh8.
Hello @GeoffWalton ,
Thanks for your response. I could successfully test password management for a client.
You stated in the doc that "It’s important to have users of secure documents create key pairs as soon as possible; they will not be able to retrieve documents" "If new users must be added later an existing user with read / write access can simply re-save the document"
Since I will have new users time to time, is it possible to script the re-save of all documents in order to automatically provide access to all new users? Is it possible to do that with command line or API?
Thanks in advance!
You probably should not do it from the command line. The idea is the server actually can’t decrypt the documents. Once they are stored and the memory gets freed (not entirely deterministic) that is the last time the server ever has the plain text for secure docs. The server also should not have the private keys, so getting the server or access to the database file is not enough to read its content. You would also have to recover a private key from a user that had rights to read the document.
Yes you could do something using the API but you would need to make sure whatever account the API is using can read/write each doc. Your script will also need to do what the javascript in the web UI does and apply the RSA key. This is fairly strait forward in Ruby or Python. You might even just grab the whole JS library and scripts from the web UI and run them in something like nodejs.
Geoff Walton | Senior Security Consultant CISSP TRUSTEDSEC, LLC C: 440.344.8967 Office: 877.550.4728 E: [email protected] https://www.trustedsec.comhttps://www.trustedsec.com/
YOUR TRUSTED SOURCE FOR INFORMATION SECURITY
From: artois333 [email protected] Reply-To: trustedsec/SHIPS [email protected] Date: Monday, July 31, 2017 at 5:35 AM To: trustedsec/SHIPS [email protected] Cc: Geoff Walton [email protected], Mention [email protected] Subject: Re: [trustedsec/SHIPS] Error when trying to run the application (#9)
Hello @GeoffWaltonhttps://github.com/geoffwalton ,
Thanks for your response. I could successfully test password management for a client.
You stated in the doc that "It’s important to have users of secure documents create key pairs as soon as possible; they will not be able to retrieve documents" "If new users must be added later an existing user with read / write access can simply re-save the document"
Since I will have new users time to time, is it possible to script the re-save of all documents in order to automatically provide access to all new users? Is it possible to do that with command line or API?
Thanks in advance!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/trustedsec/SHIPS/issues/9#issuecomment-319017595, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKKpBQgJ4v_Q3lUoufV6AMydrAMJ21hnks5sTZ_WgaJpZM4MEgh8.
Thanks for your time Geoff,
Unfortunately I don't have enough experience with ruby and nodeJS to easily test your solutions. However, I determined that when device rotates its password it resaves the document. Therefore, setting the rotate period to 1 day allow my new users to gain access the next day for all documents in device folder.