-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RDKCOM-4663 RDKDEV-999:Xdial-Parse-authorized-domains #108
Open
ArchaChandran
wants to merge
1
commit into
rdkcentral:24Q2_sprint
Choose a base branch
from
ArchaChandran:RDKCOM-4663_24Q2Sprint
base: 24Q2_sprint
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how u r passing origin and other params?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The xdial app list is initially populated from the command line. This commit
replaces the naive parsing implementation, which adds the
allowed origins based on hardcoded values with implementation, which
honors the passed origins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you share the sample command line args passed to the process after this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its the -A argument as below,
-A {"/apps/AmazonInstantVideo/dial_data":["www.primevideo.com"],"/apps/Netflix/dial_data":["www.netflix.com","www4.netflix.com"],"/apps/YouTube/dial_data":["www.youtube.com"],"/apps/YouTubeKids/dial_data":["www.youtube.com"],"/apps/system/dial_data":[]}
it can be found as in below,
Hi @apatel859 with this change in place, the -A argument is now a JSon formatted string, earlier it was a plain text and a list w/ or w/o delimeter (as i see in the code, it was just searching for some expected strings like netflix, youtube etc.)
following is something you could see if you check status of the XDial Service,
systemctl status xdial
xdial.service - Service to start/stop xdialserver
Loaded: loaded (/lib/systemd/system/xdial.service; static; vendor preset: enabled)
Active: active (running)
since Wed 2024-04-10 14:38:38 CEST; 54min ago; monotonic: 54min ago
TriggeredBy: * xdial.socket
Process: 7827 ExecStartPre=/container/DIAL/launcher/dial.sh preXdial (code=exited, status=0/SUCCESS)
Main PID: 7918 (gdial-server)
Memory: 392.0K
CGroup: /lxc.slice/xdial.service
`-7915 /usr/bin/lxc-attach -n DIAL -o none -l NOTICE -f /container/DIAL/conf/lxc.conf -u 227 -g 227 -- /bin/sh /usr/share/xdial/startXdial.sh /tmp/env_variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So static list is a legacy solution which we dont want to update. Instead app can whilte list the apps using curl -H "Authorization: Bearer
WPEFrameworkSecurityUtility | cut -d '"' -f 4
" --header "Content-Type: application/json" --request POST --data '{"jsonrpc":"2.0","id":"3","method": "org.rdk.Xcast.1.registerApplications","params":{"applications":[{"names":["YouTube", "YouTubeKids", "YouTubeTV"],"cors":[".youtube.com"],"properties":{"allowStop" :true}}]}}' http://127.0.0.1:9998/jsonrpc