Project

General

Profile

Actions

Defect #6132

closed

Allow Key based authentication in the Boards atom feed

Added by Richard Cave over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Forums
Target version:
Start date:
2010-08-13
Due date:
% Done:

100%

Estimated time:
Resolution:
Fixed
Affected version:

Description

I've looked at the fix in defect 5317 and the code changes are in the appropriate places


Files

apache.txt (855 Bytes) apache.txt Apache Log Richard Cave, 2010-08-13 14:11
production.log (4.09 KB) production.log Richard Cave, 2010-08-16 12:17
production.log (5.94 KB) production.log Richard Cave, 2010-08-16 14:17

Related issues

Related to Redmine - Defect #5317: projects.atom with required authenticationClosedEric Davis2010-04-14

Actions
Actions #1

Updated by Felix Schäfer over 13 years ago

If you are on 1.0 you don't need any patches.

Please see SubmittingBugs, especially: What ATOM feed exactly? Does it produce an error in the log?

Actions #2

Updated by Richard Cave over 13 years ago

Sorry. It's not a feed from the project, it's a feed from the Forums associated with the project. So if I create a project, then a forum for that project and add a post in the forum then try and access the Atom feed externally I get a 503 error. If I copy the url for the atom feed into a browser it takes me to the login page.

Actions #3

Updated by Felix Schäfer over 13 years ago

  • Priority changed from High to Normal

Mmh, that works for me:

curl "http://orga.fachschaften.org/projects/administration/activity.atom?key=xxxxx&show_messages=1"

Could you paste exactly what ATOM link you are trying to access (but obfuscate the key…)? If you have made any modifications to the code to change that, please also revert them. You could also try if the links in the forums here work for you.

Actions #4

Updated by Richard Cave over 13 years ago

Hello - thanks for the response. BTW - I think Redmine is brilliant.

I've made no code changes.

The url is http://80.177.48.68/redmine/projects/rmfbc/boards?format=atom&key=8361485aeaa58a50f8a57a76f0935e84e07f1f84

If you put this in Firefox you get the authentication page. If you put this in IE you get the message "Feeds with DTDs are not supported.". Works okay with Safari. Doesn't work with RSSOwl at all or Eclipse. Maybe it's the DTD that causing the problem. How would I remove the DTD. Apache log excerpt attached.

Actions #6

Updated by Felix Schäfer over 13 years ago

Are you sure you have 1.0 or at least that your upgrade went through if you upgraded recently? All ATOM links I could find (the ones for automatic discovery included) are of the form http://host/projects/identifier/boards/id.atom?key=XXXXX. Notice the URI called ends in .atom, not like the URI you have where it says format=atom. Where did you get your redmine from?

Actions #7

Updated by Richard Cave over 13 years ago

Hello.

I got the release from BitNami (http://bitnami.org/). In the root folder changelog.txt has as it's latest entry

Version 1.0.0-0 2010-07-22
*Update Remdine to 1.0.0

The Remdine is a spelling mistake in the changelog.txt

I've checked the projects_controller.rb and index.rhtml as described in http://www.redmine.org/issues/5317 and everything is there.

What do I need to change in order to get the .atom at the end instead of format=atom?

Thanks once again.

Regards

Richard

Actions #8

Updated by Felix Schäfer over 13 years ago

Well, you seem to have the right codebase, so I'm a little at a loss here…

Could you have a look at the redmine log (probably in redmine_dir/log/production.log), hit the atom link with wget or curl and paste the error here?

Actions #9

Updated by Davis Tan over 13 years ago

Hello, this happens to me too. However, I am using Safari and try to view
feed://myserver/redmine/activity.atom?key=xxxx

And it returns 0 items.

Actions #10

Updated by Richard Cave over 13 years ago

Production logs as follows the first using curl and the second RSSOwl.

  1. Logfile created on Mon Aug 16 10:04:45 +0100 2010

Processing IssuesController#index to atom (for 208.115.138.254 at 2010-08-16 10:05:43) [GET]
Parameters: {"format"=>"atom", "action"=>"index", "controller"=>"issues", "key"=>"8361485aeaa58a50f8a57a76f0935e84e07f1f84"}
Rendering common/feed.atom.rxml
Completed in 1875ms (View: 438, DB: 672) | 200 OK [http://80.177.48.68/redmine/issues.atom?key=8361485aeaa58a50f8a57a76f0935e84e07f1f84]

Processing IssuesController#index to atom (for 193.113.57.167 at 2010-08-16 10:05:46) [GET]
Parameters: {"format"=>"atom", "action"=>"index", "controller"=>"issues", "key"=>"8361485aeaa58a50f8a57a76f0935e84e07f1f84"}
Rendering common/feed.atom.rxml
Completed in 1359ms (View: 453, DB: 172) | 200 OK [http://80.177.48.68/redmine/issues.atom?key=8361485aeaa58a50f8a57a76f0935e84e07f1f84]

Cheers

Richard

Actions #11

Updated by Felix Schäfer over 13 years ago

Well, those are calls to the issues ATOM feeds, not to the board ATOM feeds, and they seem to work well. I still don't see the problem.

Actions #12

Updated by Richard Cave over 13 years ago

Sorry wrong feed - trying to do too many things this morning.

Excerpt from the log is attached.

Rich

Actions #13

Updated by Felix Schäfer over 13 years ago

Ok, try adding accept_key_auth :show on a line after before_filter :find_project, :find_board_if_available, :authorize in app/controllers/boards_controller.rb.

Actions #14

Updated by Felix Schäfer over 13 years ago

(and naturally restart the redmine server after that.)

Actions #15

Updated by Richard Cave over 13 years ago

Afraid not. Added the code stopped and started services. Added the production.log excerpt. I not get the authentication page when I call

http://80.177.48.68/redmine/projects/rmfbc/boards?format=atom&key=8361485aeaa58a50f8a57a76f0935e84e07f1f84

Sorry

Richard

Actions #16

Updated by Felix Schäfer over 13 years ago

Richard, are you sure you have 1.0.0? The atom links for a project's boards overview should be of the form yourhost.com/project/identifier/activity.atom?key=xxx&show_messages=1, yourhost.com/project/identifier/activity?format=atom&key=xxx&show_messages=1 should work too, bot nothing of the likes you are getting. Could you try if you can access the feed of a single board? It should look like http://www.redmine.org/projects/redmine/boards/1.atom?key=xxx (notice the board ID after /boards/).

Actions #17

Updated by Felix Schäfer over 13 years ago

Ok, nevermid, I see where you'd get links of that form, it's on the forums page when there is only one board in the project, right?

Actions #18

Updated by Richard Cave over 13 years ago

See update #7. This is what I've used to determine if I'm running 1.0.0. Is there another way?

Will try single and let you know.

Actions #19

Updated by Felix Schäfer over 13 years ago

Last idea, after that I'm really totally out of them: change the accept_key_auth :show I made you add earlier to accept_key_auth :show, :index.

Actions #20

Updated by Felix Schäfer over 13 years ago

Richard Cave wrote:

See update #7. This is what I've used to determine if I'm running 1.0.0. Is there another way?

No, sorry, I was really trying to understand where your link would get from but I wasn't able to make the connection to a forum with only one board (which effectively shows only that board in the forum tab instead of the list of boards if you have more than 1 board configured for that project). Aynway, I was able to reproduce the URL form you get, the problem you have, and the last change I posted made it work for me.

Actions #21

Updated by Richard Cave over 13 years ago

Working!! Well done and thank you for your time and efforts. Brilliant!

Regards

Richard

Actions #22

Updated by Richard Cave over 13 years ago

  • Status changed from New to Resolved
Actions #23

Updated by Felix Schäfer over 13 years ago

  • Status changed from Resolved to New
  • % Done changed from 0 to 80
  • Resolution set to Fixed

Glad we got this one :-) Resolved is for committed-to-trunk-but-not-to-stable-yet though.

Eric or JB, could you commit? The change is to add accept_key_auth :show, :index in the boards_controller.rb.

Actions #24

Updated by Eric Davis over 13 years ago

  • Subject changed from Atom feeds in project in version 1.0.0 still require authentication. to Allow Key based authentication in the Boards atom feed
  • Category changed from Projects to Forums
Actions #25

Updated by Eric Davis over 13 years ago

  • Status changed from New to Resolved
  • Assignee set to Eric Davis
  • Target version set to 1.0.1
  • % Done changed from 80 to 100

Added in r3942.

Actions #26

Updated by Eric Davis over 13 years ago

  • Status changed from Resolved to Closed

Merged to 1.0-stable for release in 1.0.1.

Actions

Also available in: Atom PDF