opened
claudijd
username_0
NoMethodError: undefined method `chr' for true:TrueClass
	from /Users/jclaudius/code/net-tns/lib/net/tti/crypto.rb:141:in `block in create_combined_session_key_hash_11g'
	from /Users/jclaudius/code/net-tns/lib/net/tti/crypto.rb:140:in `each'
	from /Users/jclaudius/code/net-tns/lib/net/tti/crypto.rb:140:in `create_combined_session_key_hash_11g'
	from /Users/jclaudius/code/net-tns/lib/net/tti/crypto.rb:68:in `get_11g_auth_values'
	from /Users/jclaudius/code/net-tns/lib/net/tti/client.rb:72:in `get_auth_request'
	from /Users/jclaudius/code/net-tns/lib/net/tti/client.rb:37:in `authenticate'
	from (irb):5
	from /Users/jclaudius/.rvm/rubies/ruby-2.1.4/bin/irb:11:in `<main>'
Not detecting default credentials on Oracle 11g2
issue
created
woodbusy
username_1
I think I remember seeing this before, but I no longer have access to an 11g R2 server. Could you add a pcap or a branch with added (failing) specs?
comment
created
claudijd
username_0
I just sent you a PCAP of the above activity.  Sorry for the delay.
comment
created
mrakhmanov
username_2
The server (11g2) sends 10g style response to the client because the negotiation does not fully follow 11g2 protocol. Acting differently based upon auth_sesskey.length may help to solve this particular problem. There is a another issue: authentication code is not reached for many targets having different platform, architecture, and version different from what the client has. TTIDTY message exchange phase which happens just before AUTH does not complete successfully.
comment
created
woodbusy
username_1
@username_2 thanks for your wisdom. I appreciate it! I'm not surprised that there are other issues, given my limited testing environment and knowledge of TTI - DTY especially is almost a complete mystery to me. If you have any more specifics you could comment on or create issues for, that would be great.

@username_0 I took @username_2's approach with the code in #20. If you (or anyone else with an 11g2 server) could try it out, that would be great.
comment
created
claudijd
username_0
?> tti_client.authenticate( "test", "NOT_THE_PASSWORD" )
    Net::TTI::Exceptions::ProtocolException: Unexpected AUTH_SESSKEY length: 32
     from /Users/jclaudius/code/net-tns/lib/net/tti/client.rb:74:in `get_auth_request'
     from /Users/jclaudius/code/net-tns/lib/net/tti/client.rb:37:in `authenticate'
     from (irb):7
     from /Users/jclaudius/.rvm/rubies/ruby-2.1.4/bin/irb:11:in `<main>'

FWIW, I get the same error for valid (as I know them) and invalid creds.  @username_2 any chance the creds changed recently from what was previously provided?
comment
created
claudijd
username_0
Net::TTI::Exceptions::InvalidCredentialsError: ORA-01017: invalid username/password; logon denied

    	from /Users/jclaudius/code/net-tns/lib/net/tti/client.rb:43:in `rescue in authenticate'
    	from /Users/jclaudius/code/net-tns/lib/net/tti/client.rb:31:in `authenticate'
    	from (irb):6
    	from /Users/jclaudius/.rvm/rubies/ruby-2.1.4/bin/irb:11:in `<main>'
comment
created
claudijd
username_0
Net::TTI::Exceptions::ProtocolException: Unexpected AUTH_SESSKEY length: 32
    	from /Users/jclaudius/code/net-tns/lib/net/tti/client.rb:74:in `get_auth_request'
    	from /Users/jclaudius/code/net-tns/lib/net/tti/client.rb:37:in `authenticate'
    	from (irb):6
    	from /Users/jclaudius/.rvm/rubies/ruby-2.1.4/bin/irb:11:in `<main>'

It seems @username_2's changes are more accurate, but the specs will need to be updated to get them passing.
comment
created
claudijd
username_0
Additionally, we should probably also validate that we can check default creds on a range of supported Oracle DB endpoints.  I'm not that familiar with Oracle versions to determine what we should test against, but open to suggestions.
comment
created
woodbusy
username_1
@username_0 yeah, looks like I'm bad at math (16 and 24 in the `case` should have been 32 and 48). Going forward, I think that @username_2's changes are going to be a huge improvement, so I'm going to focus on that path rather than #20.
comment