[rabbitmq-discuss] How to specify user/pass
Alexander Ward
alexander.ward at quibids.com
Mon Jul 2 23:34:58 BST 2012
Ah. I have never used said plugin, so I don't really know anything about
it. My guess would be that your configuration is off a little bit (for
example, I have no idea if both stanzas need to be inside of env or not).
But the documentation does say:
Check the RabbitMQ logs if things don't seem to be working properly. Look
> for log messages containing "rabbit_auth_backend_http failed".
>
Best of luck.
-Alex
On Mon, Jul 2, 2012 at 5:22 PM, eleanor <evangeline.eleanor at gmail.com>wrote:
> Yeah, that works fine with internal authentication scheme of rabbitmq.
>
> But what about
> https://github.com/simonmacmullen/rabbitmq-auth-backend-http
> . I've installed the plugin successfully.
>
> Then I've put the following into ebin/rabbit.app as HTTP README says:
>
> {application,rabbit,
> [{description,"RabbitMQ"},
> {id,"RabbitMQ"},
> {vsn,"%%VSN%%"},
> {modules,
>
> [app_utils,credit_flow,delegate,delegate_sup,dtree,file_handle_cache,
>
> gatherer,gen_server2,gm,gm_soak_test,gm_speed_test,gm_tests,lqueue,
>
> mirrored_supervisor,mirrored_supervisor_tests,mnesia_sync,pg2_fixed,
> pg_local,pmon,priority_queue,rabbit,rabbit_access_control,
> rabbit_alarm,rabbit_amqqueue,rabbit_amqqueue_process,
> rabbit_amqqueue_sup,rabbit_auth_backend,
> rabbit_auth_backend_internal,rabbit_auth_mechanism,
> rabbit_auth_mechanism_amqplain,rabbit_auth_mechanism_cr_demo,
> rabbit_auth_mechanism_plain,rabbit_backing_queue,
> rabbit_backing_queue_qc,rabbit_basic,rabbit_binary_generator,
> rabbit_binary_parser,rabbit_binding,rabbit_channel,
> rabbit_channel_sup,rabbit_channel_sup_sup,rabbit_client_sup,
>
> rabbit_command_assembler,rabbit_connection_sup,rabbit_control_main,
> rabbit_ctl_usage,rabbit_direct,rabbit_disk_monitor,
> rabbit_error_logger,rabbit_error_logger_file_h,rabbit_event,
> rabbit_exchange,rabbit_exchange_decorator,rabbit_exchange_type,
> rabbit_exchange_type_direct,rabbit_exchange_type_fanout,
> rabbit_exchange_type_headers,rabbit_exchange_type_invalid,
> rabbit_exchange_type_topic,rabbit_file,rabbit_framing,
> rabbit_framing_amqp_0_8,rabbit_framing_amqp_0_9_1,rabbit_guid,
> rabbit_heartbeat,rabbit_limiter,rabbit_log,rabbit_memory_monitor,
> rabbit_mirror_queue_coordinator,rabbit_mirror_queue_master,
> rabbit_mirror_queue_misc,rabbit_mirror_queue_slave,
> rabbit_mirror_queue_slave_sup,rabbit_misc,rabbit_mnesia,
> rabbit_msg_file,rabbit_msg_store,rabbit_msg_store_ets_index,
> rabbit_msg_store_gc,rabbit_msg_store_index,rabbit_net,
> rabbit_networking,rabbit_node_monitor,rabbit_nodes,
> rabbit_parameter_validation,rabbit_plugins,rabbit_plugins_main,
> rabbit_plugins_usage,rabbit_policy,rabbit_prelaunch,
> rabbit_queue_collector,rabbit_queue_index,rabbit_reader,
> rabbit_registry,rabbit_restartable_sup,rabbit_router,
> rabbit_runtime_parameter,rabbit_runtime_parameters,
>
> rabbit_runtime_parameters_test,rabbit_sasl_report_file_h,rabbit_ssl,
> rabbit_sup,rabbit_tests,rabbit_tests_event_receiver,rabbit_trace,
> rabbit_types,rabbit_upgrade,rabbit_upgrade_functions,
> rabbit_variable_queue,rabbit_version,rabbit_vhost,rabbit_writer,
> supervisor2,tcp_acceptor,tcp_acceptor_sup,tcp_listener,
> tcp_listener_sup,test_sup,vm_memory_monitor,worker_pool,
> worker_pool_sup,worker_pool_worker]},
> {registered,
> [rabbit_amqqueue_sup,rabbit_log,rabbit_node_monitor,rabbit_router,
> rabbit_sup,rabbit_tcp_client_sup,rabbit_direct_client_sup]},
> {applications,[kernel,stdlib,sasl,mnesia,os_mon]},
> {mod,{rabbit,[]}},
> {rabbitmq_auth_backend_http,
> [{user_path, "http://127.0.0.1/auth/user"},
> {vhost_path, "http://127.0.0.1/auth/vhost"},
> {resource_path, "http://127.0.0.1/auth/resource"}]},
> {env,
> [{hipe_compile,false},
> {tcp_listeners,[5672]},
> {ssl_listeners,[]},
> {ssl_options,[]},
> {vm_memory_high_watermark,0.4},
> {disk_free_limit,1000000000},
> {msg_store_index_module,rabbit_msg_store_ets_index},
> {backing_queue_module,rabbit_variable_queue},
> {frame_max,131072},
> {msg_store_file_size_limit,16777216},
> {queue_index_max_journal_entries,262144},
> {default_user,<<"guest">>},
> {default_pass,<<"guest">>},
> {default_user_tags,[administrator]},
> {default_vhost,<<"/">>},
> {default_permissions,[<<".*">>,<<".*">>,<<".*">>]},
> {cluster_nodes,[]},
> {server_properties,[]},
> {collect_statistics,none},
> {collect_statistics_interval,5000},
> {auth_mechanisms,['PLAIN','AMQPLAIN']},
> {auth_backends,[rabbitmq_auth_backend_http]},
> {delegate_count,16},
> {trace_vhosts,[]},
> {log_levels,[{connection,info}]},
> {ssl_cert_login_from,distinguished_name},
> {tcp_listen_options,
> [binary,
> {packet,raw},
> {reuseaddr,true},
> {backlog,128},
> {nodelay,true},
> {linger,{true,0}},
> {exit_on_close,false}]}]}]}.
>
>
>
> Notice the:
> {rabbit, [{auth_backends, [rabbit_auth_backend_http]}]},
> {rabbitmq_auth_backend_http,
> [{user_path, "http://some-server/auth/user"},
> {vhost_path, "http://some-server/auth/vhost"},
> {resource_path, "http://some-server/auth/resource"}]}
>
>
>
> The problem is that with the following send.py I cannot login to the
> rabbitmq with HTTP server:
> #!/usr/bin/env python
> import pika
>
> credentials = pika.PlainCredentials('test', 'test')
> params = pika.ConnectionParameters(credentials=credentials,
> host="localhost", virtual_host='/')
> connection = pika.BlockingConnection(params)
> channel = connection.channel()
> channel.queue_declare(queue='')
> channel.basic_publish(exchange='logs', routing_key='', body='Hello World!')
> connection.close()
>
>
> I specified the test:test username and password, since that's what I added
> to the django application, which is included as an example to the HTTP
> plugin. If I enter the GET request:
> http://127.0.0.1:8000/auth/user?username=test&password=test
>
> everything is ok - the user is authenticated.
>
> But when I try to login with the send.py script, the GET request isn't even
> made. Now my question is: how to fix rabbitmq for rabbitmq to start making
> GET requests to the http server or how to debug an issue?
>
> Thank you
>
> --
> View this message in context:
> http://rabbitmq.1065348.n5.nabble.com/How-to-specify-user-pass-tp20479p20525.html
> Sent from the RabbitMQ mailing list archive at Nabble.com.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120702/c0f77eaa/attachment.htm>
More information about the rabbitmq-discuss
mailing list