forked from Transitime/core
-
Notifications
You must be signed in to change notification settings - Fork 31
Multi agency and apiKeys relationship #273
Copy link
Copy link
Open
Description
In the Multi Agency wiki setup guide, I follow Step 4 to create
- 1 api key (
abc123) for myprimaryagency - 1 api key (
def456) for myhalifaxsecondary agency
WebAgency data for both are stored in the primary agency database only.
Then, I start tomcat for API and WEB, using
JAVA_OPTS="-Dtransitclock.apikey=abc123 -Dtransitclock.configFiles=/home/ubuntu/transitime/primary.properties"
as I understand it only requires 1 instance of API and WEB.
My question is, why do I need 2 api keys if only the primary key is passed to Tomcat?
I can curl
api/v1/key/abc123/agency/primary/command/routes?format=json
api/v1/key/abc123/agency/halifax/command/routes?format=json
and get the correct results.
I expect halifax agency should require its own apikey, but it does not look like this is the case???
And when I curl
api/v1/key/def456/agency/primary/command/routes?format=json
api/v1/key/def456/agency/halifax/command/routes?format=json
it shows key is not valid.
Does this mean all agencies essentially share the same apiKey?
PS: obviously the apiKey is obfuscated.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels